We use cookies to improve your experience.
By your continued use of this site you accept such use.
For more details please see our privacy policy and cookies policy.

Script repository

Activate license key

January 20, 2023 Views: 969

The script activates the license key for Adaxes. In the script, the $licensePath variable specifies the path to the license key. When prompted, specify the credentials of the Adaxes service account (specified during installation).

Edit Remove

$licensePath = "C:\scripts\license.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)
Comments 0
Leave a comment

Got questions?

Support Questions & Answers