Disable-NCacheSecurity
This PowerShell cmdlet disables NCache security on a specified server. The cmdlet verifies the provided administrative credentials, which may belong to a local or domain administrator on the server or an NCache administrator configured on that node. Once the credentials are successfully verified, NCache security is disabled on the server. Security can only be restored by explicitly re-enabling it using the Enable-NCacheSecurity cmdlet.
Disable-NCacheSecurity -Server -MachineAdminCredentials `
[-TlsCertPath] [-TlsCertPassword]
Examples
- This command disables NCache security on the server with the IP address 20.200.20.11. Prior to disabling security, the command confirms that David Watson has the required permissions on the server, using security credentials.
Disable-NCacheSecurity -Server 20.200.20.11 -MachineAdminCredentials(Get-Credential david_watson)
- This command disables NCache security on the specified server using the david_watson machine administrator credentials. It runs from a machine where NCache is not installed and connects to the server using mutual TLS (mTLS). The client certificate
C:\certs\client.pemauthenticates the machine running the cmdlet, and-TlsCertPassworddecrypts the certificate’s password-protected private key. Omit this parameter if the private key is not encrypted.
Disable-NCacheSecurity -Server 20.200.20.11 -MachineAdminCredentials(Get-Credential david_watson) `
-TlsCertPath "C:\certs\client.pem" -TlsCertPassword "clientKeyPassword"
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-Server* |
<String> |
Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. You can specify the IP addresses of the servers where security should be disabled. This parameter can accept multiple IP addresses, allowing you to disable security on multiple servers simultaneously. | - |
-MachineAdminCredentials* |
<pscredential> |
Specifies the credentials of a local administrator on the target machine, used to authorize disabling security. | - |
-TlsCertPath |
<string> |
Specifies the path to the client PEM certificate used to authenticate this cmdlet when the target NCache server requires Mutual TLS. This parameter is required for Mutual TLS connections even when the cmdlet runs on an NCache server. The PEM file must contain the private key, leaf certificate, and any intermediate certificates. Relative paths are resolved against the current PowerShell location, and the file must exist. You can generate a client certificate using New-NCacheTlsCertificate. | - |
-TlsCertPassword |
<string> |
Password used to load the encrypted private key in the PEM file specified by -TlsCertPath. Required only when the private key is password-protected. Not needed for an unencrypted private key. The password is used only to load the client certificate for the current command's connections. It is not saved in the NCache server configuration. |
- |