Enable-NCacheSecurity
The Enable-NCacheSecurity PowerShell cmdlet enables server-level security on an NCache node by validating the provided administrative credentials against the configured LDAP or Active Directory provider, ensuring that only authorized NCache administrators can enable and manage secured caches. In addition to enforcing authentication and authorization for all cache operations, the cmdlet can optionally store encrypted credentials in the NCache service configuration, allowing caches configured for auto-start to initialize automatically during service startup or system reboot, making it especially useful for production environments that require secure, unattended cache availability.
Enable-NCacheSecurity -AdminCredentials -Server [-WriteCredentialsToServiceConfig] [-NoLogo]
Examples
- This command enables NCache security on the server with the IP address 20.200.20.11. Before enabling security, it validates that John Smith has the necessary privileges on the server using credentials.
Enable-NCacheSecurity -Server 20.200.20.11 -AdminCredentials (Get-Credential john_smith)
- This command enables NCache security on the server with the IP address 20.200.20.11. Before enabling security, the command validates whether John Smith has the necessary privileges on the server. Additionally, the
-WriteCredentialsToServiceConfigswitch stores the provided credentials in an encrypted form within the service configuration. These stored credentials will be used to facilitate the auto-startup of configured caches with the associated credentials.
Enable-NCacheSecurity -Server 20.200.20.11 -AdminCredentials (Get-Credential john_smith) -WriteCredentialsToServiceConfig
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-AdminCredentials* |
<pscredential> |
Specifies the credentials of an LDAP user with administrative rights on the given 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 the IP addresses of the servers where security should be enabled. This parameter can accept multiple IP addresses, allowing you to enable security on multiple servers simultaneously. | - |
-WriteCredentialsToServiceConfig |
<SwitchParameter> |
Specifies whether to write to service configurations. | False |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |