Get-CacheCount
This PowerShell cmdlet enables the user to get the total number of items currently present in the cache.
Get-CacheCount -Name [-Server] [-NoLogo] [-Credentials]
Examples
- This command displays total number of items currently present in the cache. This command reads the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache
- This command displays total number of items currently present in the cache. This command ignores the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache -Server "20.200.20.11,20.200.20.12"
- This command displays total number of items currently present in the cache, using security credentials. This command reads the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache -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 |
-Name* |
<String> |
Specifies the name of the cache for which the item count is needed. Note: The cache must already exist on the source server. |
- |
-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 one or more IP-address(es) for one or more cache-server(s). This option can be used to customize the list of IP-address(es) to be displayed. Note: Comma separated ip-addresses are to be specified in case of multiple servers inside double quotes. |
IP of local machine |
-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 with the appropriate permissions at the node. |
- |
get-cachecount -name [-server] [-nologo] [-userid] [-password]
Examples
- This command displays total number of items currently present in the cache. This command reads the deployment details specified in the config.ncconf.
get-cachecount -name demoCache
- This command displays total number of items currently present in cache. This command ignores the deployment details specified in the config.ncconf.
get-cachecount -name demoCache -server "20.200.20.11,20.200.20.12"
- This command displays total number of items currently present in the cache, using security credentials. This command reads the deployment details specified in the config.ncconf.
get-cachecount -name demoCache -userid john_smith -password pass123
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameters |
Data Types |
Description |
Default Value |
-name* |
<String> |
Specifies the name of the cache for which the item count is needed. Note: The cache must already exist on the source server. |
- |
-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 one or more IP-address(es) for one or more cache-server(s). This option can be used to customize the list of IP-address(es) to be displayed. Note: Comma separated ip-addresses are to be specified in case of multiple servers inside double quotes. |
IP of local machine |
-nologo |
<SwitchParameter> |
Suppresses display of the logo banner. |
False |
-userid |
<String> |
Specifies the user id used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This user id must be the active directory user id. |
- |
-password |
<String> |
Specifies the password of the user that is used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This password must be the same as the active directory user password. |
- |