Remove-ClientCache
The Remove-ClientCache cmdlet removes the Client Cache configuration associated with a clustered cache. After removal, the client will no longer use data from the client cache (L1 cache), and communication will revert to direct interaction with the clustered cache (L2 cache).
Remove-ClientCache -CacheName [-Port] `
[-Server] [-Credentials] `
[-TlsCertPath] [-TlsCertPassword] `
[-NoLogo]
Examples
- This command removes the Client Cache configured for defaultCache on the local server.
Remove-ClientCache -CacheName defaultCache
- This command removes the Client Cache configured for defaultCache on server 20.200.20.11.
Remove-ClientCache -CacheName defaultCache -Server 20.200.20.11
- This command specifies the port to remove Client Cache configuration on server 20.200.20.11.
Remove-ClientCache -CacheName defaultCache -Server 20.200.20.11 `
-Port 9803
- This command removes the Client Cache configuration using security credentials.
Remove-ClientCache -CacheName defaultCache -Server 20.200.20.11 `
-Credentials(Get-Credential john_smith)
- This command removes the Client Cache configuration associated with defaultCache on server 20.200.20.11 using a client PEM certificate and password for mutual TLS (mTLS) authentication.
Remove-ClientCache -CacheName defaultCache -Server 20.200.20.11 `
-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 |
|---|---|---|---|
-CacheName* |
<String> |
Specifies the name of the clustered cache whose Client Cache configuration is removed. | - |
-Port |
<Integer> |
Specifies the server port where NCache server is listening. | 9803 |
-Server |
<String> |
Specifies the name or IP address of the NCache server where the clustered cache is registered. | IP of local machine |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. | - |
-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> |
Specifies the password for the encrypted private key in the PEM file provided through -TlsCertPath. Omit this parameter if the private key is not encrypted. The password is used only for the current command and is not saved in the NCache server configuration. |
- |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |