Get-Caches
The Get-Caches cmdlet retrieves a complete list of all registered caches, displaying their topology (Local, Partitioned, Replicated, or Partition-Replica), running or stopped status, and essential operational details. Administrators use Get-Caches to quickly assess cache health, verify deployments, and troubleshoot issues across clustered and standalone NCache environments on Windows.
Note
This feature is also available in the NCache Open Source. Please keep in mind that NCache Open Source has different parameters in some cmdlet instances.
Get-Caches [-Server] [-Port] `
[-InMemoryStoreType] [-Topology] `
[-Detail] [-NoLogo] `
[-TlsCertPath] [-TlsCertPassword] `
[-Credentials]
Examples
- This command displays all caches registered on the local machine.
Get-Caches
- This command displays all caches currently registered on the server 20.200.20.11 with detailed information.
Get-Caches -Detail -Server 20.200.20.11
- This command displays all caches registered on the local machine with detailed information.
Get-Caches -Detail
- This command displays all
DistributedCachecaches currently registered on the server 20.200.20.11 with detailed information.
Get-Caches -Detail -Server 20.200.20.11 `
-InMemoryStoreType DistributedCache
- This command displays all Partitioned caches currently registered on the server 20.200.20.11 with detailed information.
Get-Caches -Detail -Server 20.200.20.11 `
-Topology Partitioned
- This command displays all
DistributedCachePartitioned caches currently registered on the server 20.200.20.11 with detailed information.
Get-Caches -Detail -Server 20.200.20.11 `
-InMemoryStoreType DistributedCache -Topology Partitioned
- This command displays detailed information about the caches registered on the specified server with mutual TLS (mTLS) enabled. It runs from a machine where NCache is not installed and uses
C:\certs\client.pemto authenticate the machine running the cmdlet. The-TlsCertPasswordparameter decrypts the certificate’s password-protected private key. Omit this parameter if the private key is not encrypted.
Get-Caches -Detail -Server 20.200.20.11 `
-TlsCertPath "C:\certs\client.pem" -TlsCertPassword "clientKeyPassword"
- This command displays detailed information about all caches running on server 20.200.20.11 using user credentials.
Get-Caches -Detail -Server 20.200.20.11 `
-Credentials(Get-Credential john_smith)
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. It includes the server node for which the user wants to get the list of registered caches. | IP of local machine |
-Port |
<Integer> |
Specifies the server port where the NCache Service is listening. | 9803 |
-InMemoryStoreType |
<String> |
Specifies the type of the cache. | - |
-Topology |
<String> |
For topology other than local you have to give topology and cluster port. Specifies the topology in case of clustered cache. | - |
-Detail |
<SwitchParameter> |
Displays comparatively detailed information about the caches registered on the server. This information includes Cache-Name, Status, Process-ID, Cluster-size, UpTime, Capacity and Count. | False |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user who has appropriate permissions at the node. | - |
-TlsCertPath |
<string> |
Path to the client PEM certificate used to authenticate the machine running the NCache PowerShell cmdlet when connecting to an NCache server with mutual TLS (mTLS) enabled. The PEM file must contain the private key, leaf certificate, and any intermediate certificates. You can generate a certificate using New-NCacheTlsCertificate. This parameter is required when running the PowerShell module from a machine where NCache is not installed and the server requires mTLS. On a machine with an NCache server installation, the node's own certificate is used automatically. Relative paths are resolved against the current PowerShell location, and the file must exist. To configure the certificate presented by the server, use -CustomCertificatePath. |
- |
-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. |
- |