Script repository
The script activates the license key for Adaxes. It should be executed in Windows PowerShell on the computer where Adaxes service runs. When prompted, specify the credentials of the Adaxes service account (entered during the software installation).
In the script, the $licensePath variable specifies the path to the license key.
Import-Module Adaxes
$licensePath = "C:scriptslicense.admlic" # TODO: modify me
# Connect to the Adaxes service.
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly("localhost")
# Prompt for credentials.
$credential = Get-Credential
# Bind to the 'Configuration' container.
$configurationSetSettingsPath = $service.Backend.GetConfigurationContainerPath("ConfigurationSetSettings")
$configurationSetSettings = $service.OpenObject($configurationSetSettingsPath, $credential.UserName, $credential.GetNetworkCredential().Password, 0)
# Set License.
$license = [System.IO.File]::ReadAllBytes($licensePath)
$configurationSetSettings.SetLicense($license)
Comments 0
You must be signed in to comment.