Enable-NCacheSecurity
The Enable-NCacheSecurity PowerShell cmdlet enables server-level security on an NCache node. It validates the provided machine administrator credentials on the target server and verifies the specified Node Admin user or group against the configured LDAP or Active Directory provider. Once security is enabled, only authorized users can perform NCache management operations on the secured node.
Enable-NCacheSecurity -MachineAdminCredential -NodeAdminName \
-NodeAdminDN -DomainController [-DomainControllerPort] \
[-SecondaryDomainController] [-SecondaryDomainControllerPort] \
-Server [-DirectoryBrowsingCredential]
Examples
- This command enables NCache security on the server 20.200.20.11. The machine administrator credentials are used to verify that David Watson has local administrator privileges on the specified server. The user Michael Parker is registered as the Node Admin, which authorizes the user to perform NCache management operations.
$machineAdmin = Get-Credential david_watson \
-Enable-NCacheSecurity -Server 20.200.21.11 \
-MachineAdminCredential $machineAdmin -NodeAdminName michael_parker \
-NodeAdminDN "CN=Michael Parker,OU=engineers,DC=example,DC=com" \
-DomainController domain_controller -DomainControllerPort 389
- This command enables NCache security on the server 20.200.20.11. As David Watson is a local account and cannot query the directory directly, John Smith is supplied via
-DirectoryBrowsingCredentialto browse the directory and validate Michael Parker's Distinguished Name against the domain controller.
$machineAdmin = Get-Credential david_watson \
$directoryUser = Get-Credential john_smith \
-Enable-NCacheSecurity -Server 20.200.21.11 \
-MachineAdminCredential $machineAdmin -NodeAdminName michael_parker \
-NodeAdminDN "CN=Michael Parker,OU=engineers,DC=example,DC=com" \
-DomainController domain_controller -DomainControllerPort 389 \
-DirectoryBrowsingCredential $directoryUser
This command enables NCache security on the server with the IP address 20.200.20.11. Before enabling security, the command validates whether Michal Parker has the necessary privileges on the server.
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameter | Data Types | Description |
|---|---|---|
-MachineAdminCredential* |
<pscredential> |
Specifies the credentials of a user who is a local administrator on the machine where security is being enabled. |
-NodeAdminName* |
<string> |
Specifies the username or name of the user or group to be designated as the Node Admin for NCache management operations. |
-NodeAdminDN* |
<string> |
Specifies the full Distinguished Name of the Node Admin user or group. For example, CN=ncache-admins,OU=Groups,DC=corp,DC=example,DC=com. |
-DomainController* |
[<string>] |
Specifies the IP address or hostname of the domain controller used to validate the Node Admin identity. |
-DomainControllerPort |
[<int>] |
Specifies the port on which the domain controller is listening. The default port is 389. |
-SecondaryDomainController |
[<string>] |
Specifies the IP address or hostname of the secondary domain controller used to validate the Node Admin identity. |
-SecondaryDomainControllerPort |
[<int>] |
Specifies the port on which the secondary domain controller is listening. The default port is 389. |
-Server* |
<string> |
Specifies the IP address of the server where security should be enabled. This parameter can accept multiple IP addresses, allowing you to enable security on multiple servers simultaneously. |
-DirectoryBrowsingCredential |
<pscredential> |
Specifies the credentials of an account used to browse the directory and validate the Node Admin. This parameter is required only when the machine administrator account cannot query the directory itself. |