Register-NCacheLicense
The Register-NCacheLicense PowerShell cmdlet activates or reactivates an NCache license on a machine. It supports online and offline activation, Client-Server licensing, and registration of Docker containers or cloud images. It also supports client-certificate authentication when connecting to an NCache server configured for mutual TLS (mTLS).
Note
To register NCache Open Source, use the Register-NCacheOpenSource cmdlet.
Note
Run PowerShell with administrator privileges to execute this cmdlet.
Register-NCacheLicense [-Key] [-Environment] `
[-Clients] [-Reactivate] `
[-AuthCode] [-Server] `
[-Port] [-TlsCertPath] `
[-TlsCertPassword] [-Credentials] `
[-OfflineActivate] [-NoLogo] `
[-LicenseDuration] [-Recurring]`
Examples
- This command registers NCache on the local server with a Server-Only license key for the Production environment.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx -Environment Production
- This command registers NCache on server
20.200.20.11with a Client-Server license key for the Production environment and activates four client licenses.
Important
For Client-Server (Containerized) licensing, specify the number of client licenses to activate using -Clients.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx -Server 20.200.20.11 `
-Environment Production -Clients 4
- This command reactivates NCache on an already activated server using an existing license key.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx -Server 20.200.20.11 `
-Reactivate $true -Environment Production -Clients 4
- This command generates an Activation Request Code URL to activate NCache on a server without internet access. Open the generated URL on a computer with internet access to obtain an Activation Authorization Code, then use that code on the offline server.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx -Server 20.200.20.11 `
-Environment Production -OfflineActivate
- This command completes offline license activation using the Activation Authorization Code obtained from the offline activation process.
Register-NCacheLicense -AuthCode xxxxxxxxxxxxxx -OfflineActivate
- This command registers NCache with a Standard license duration (Annual or Perpetual) on the local server.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx `
-Environment Production -LicenseDuration Standard
- This command registers NCache on server
20.200.20.11for the Production environment with four client licenses, authenticating to a server with mutual TLS (mTLS) enabled using a client PEM certificate.
Register-NCacheLicense -Key xxxxxxxx-xxxxxx-xxxxxxxx -Server 20.200.20.11 `
-Environment Production -Clients 4 `
-TlsCertPath "C:\certs\client.pem" `
-TlsCertPassword "clientKeyPassword"
The -TlsCertPath parameter specifies the client PEM certificate used to authenticate the machine running the cmdlet. The -TlsCertPassword parameter decrypts its password-protected private key. Omit -TlsCertPassword if the private key is not encrypted.
Properties
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-Key |
<String> |
Specifies the license key received from Alachisoft. | - |
-Environment |
<String> |
Specifies the environment for which the machine is being activated. Required when applicable during activation or reactivation. | - |
-Clients |
<Integer> |
Specifies the number of client licenses to activate for the environment during Client-Server (Containerized) licensing. | - |
-Reactivate |
<Boolean> |
Reactivates an existing NCache activation. | - |
-AuthCode |
<String> |
Specifies the Activation Authorization Code provided for offline activation. | - |
-Server |
<String> |
Specifies the server on which the NCache Service is running. If omitted, the local machine is used. | Local machine |
-Port |
<Long> |
Specifies the port used to connect to the NCache Service. | - |
-TlsCertPath |
<String> |
Specifies the path to the client PEM certificate used to authenticate this cmdlet when the target NCache server requires Mutual TLS. This parameter is required for Mutual TLS connections even when the cmdlet runs on an NCache server. The PEM file must contain the private key, leaf certificate, and any intermediate certificates. Relative paths are resolved against the current PowerShell location, and the file must exist. You can generate a client certificate using New-NCacheTlsCertificate. | - |
-TlsCertPassword |
<String> |
Specifies the password for the encrypted private key in the PEM file provided through -TlsCertPath. Omit this parameter if the private key is not encrypted. The password is used only for the current command and is not saved in the NCache server configuration. |
- |
-Credentials |
<pscredential> |
Specifies credentials required to authorize the operation on the NCache server. The user must have appropriate permissions on the node. | - |
-OfflineActivate |
<SwitchParameter> |
Initiates offline activation and generates an Activation Request Code URL. Use the resulting Authorization Code with -AuthCode and -OfflineActivate to complete activation. |
False |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-LicenseDuration |
<LicenseDuration> |
Specifies the license duration: Standard (Annual or Perpetual) or Hourly (cloud only). |
Standard |
-Recurring |
<SwitchParameter> |
Enables recurring licensing when applicable. | False |