Set-NCServiceConfigSetting
The Set-NCServiceConfigSetting
cmdlet is used to add or update a key-value pair in the Alachisoft.NCache.Service.dll.config file on NCache servers. If the configuration change is hot-applicable, it will be applied immediately without requiring a service restart.
Set-NCServiceConfigSetting -Key [-Value] [-Server] [-Credentials]
Examples of Set-NCServiceConfigSetting
- This command sets the
NCacheServer.EventBulkCount
key-value pair in the Alachisoft.NCache.Service.dll.config file as per your requirement.
Set-NCServiceConfigSetting -Key NCacheServer.EventBulkCount -Value 50
- This command sets the
NCacheServer.EnableCacheLastAccessCount
key-value pair in the Alachisoft.NCache.Service.dll.config file on the server 20.200.20.11.
Set-NCServiceConfigSetting -Key NCacheServer.EnableCacheLastAccessCount -Value false -Server 20.200.20.11
- This command sets the
NCacheServer.EnableCommandThresholdLogging
key-value pair in the Alachisoft.NCache.Service.dll.config file as per your requirement.
Set-NCServiceConfigSetting -Key NCacheServer.EnableCommandThresholdLogging -Value false
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 one or more IP addresses of NCache server(s) where the configuration change should be applied. Note: For multiple servers, provide comma-separated IP addresses inside double quotes. | - |
-Credentials |
<pscredential> |
Specifies the user credentials used to authorize the user for this operation. It is required in case security is enabled on cache server. The password must be the same as the active directory user password. The user id must be the same as the active directory user id. | - |
-Key* |
<String> |
Specifies the key to be added or updated in the Alachisoft.NCache.Service.dll.config file. | - |
-Value* |
<String> |
Specifies the value to associate with the specified key. | - |