Add-NCacheUserOrGroup - PowerShell Cmdlet
This PowerShell Cmdlet helps to add a user or group to the NCache security configuration. The security configuration in question can be a NCache node or cache security configuration in this PowerShell Cmdlet.
Note
This feature is only available in NCache Enterprise.
Add-NCacheUserOrGroup [-AccessLevel] [-CacheName] [-Server] [-UserOrGroupName] [-UserOrGroupDN] [-DomainController] [-DomainControllerPort] [-SecondaryDomainController] [-SecondaryDomainControllerPort] [-EnableSecurity] -AdminCredentials
Examples of Add-NCacheUserOrGroup - PowerShell Cmdlet
- This PowerShell Cmdlet adds the user 'John Smith' as an NCache admin on the server with the IP address 20.200.20.11.
Add-NCacheUserOrGroup -Server 20.200.20.11 -AccessLevel Admin -AdminCredentials(Get-Credential john_smith) -UserOrGroupName john_smith -UserOrGroupDN "CN=John Smith,OU=engineers,DC=example,DC=com" -DomainController test_domain
- This command adds the user 'John Smith' as a cache user for the 'demoCache' cache hosted on the server with the IP address 20.200.20.11. Upon successful addition of the user, NCache security is also enabled on the server.
Add-NCacheUserOrGroup -Server 20.200.20.11 -AccessLevel Cache -CacheName demoCache -AdminCredentials(Get-Credential john_smith) -UserOrGroupName john_smith -UserOrGroupDN "CN=John Smith,OU=engineers,DC=example,DC=com" -DomainController test_domain -EnableSecurity Yes
- This command adds a group named 'Dev' as an NCache admin group on the server with IP address 20.200.20.11. Upon successful addition of the group, NCache security is also enabled on the server.
Add-NCacheUserOrGroup -Server 20.200.20.11 -AccessLevel Admin -AdminCredentials(Get-Credential john_smith) -UserOrGroupName dev -UserOrGroupDN "CN=Dev,OU=engineers,DC=example,DC=com" -DomainController test_domain -EnableSecurity Yes
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-AccessLevel* |
<String> |
Specifies the access level of the user or group being added. If you are adding a cache user, then valid value is "Cache" and for an NCache admin, the value will be "Admin". | - |
-CacheName |
<String> |
Specifies the name of the cache for which the user or group is being added. This parameter is required when the access level is set to "Cache". | - |
-Server* |
<String> |
Specifies the IP address of the NCache server to which the user or group is being added. | - |
-AdminCredentials* |
<pscredential> |
Specifies the credentials of an LDAP user with administrative rights on the given server. These credentials are used for authentication and authorization to perform the addition. | - |
-UserOrGroupName* |
<String> |
Specifies the name of the user or group being added. | - |
-UserOrGroupDN* |
<String> |
Specifies the Distinguished Name (DN) of the user or group being added. This DN uniquely identifies the user or group in the LDAP directory. You can specify it like this, i.e., -UserOrGroupDN "CN=Dev,OU=engineers,DC=example,DC=com" | - |
-DomainController* |
<String> |
Specifies the IP address or name of the server at which the domain controller is hosted. | - |
-DomainControllerPort |
<String> |
Specifies the port at which the domain controller is listening. | 389 |
-SecondaryDomainController |
<String> |
Specifies the IP address or name of the server on which the secondary domain controller is hosted. | - |
-SecondaryDomainControllerPort |
<Integer> |
Specifies the port at which the secondary domain controller is listening. | 389 |
-EnableSecurity |
<String> |
Specifies whether to enable security after successfully adding the user or group. Valid values are "Yes" or "No". | False |