The script updates the number of noise lines in captcha displayed on the Sign In page of Adaxes Web interface. Execute the script in Windows PowerShell on the computer where Adaxes service is installed. When prompted, specify the credentials of the Adaxes service account (specified during Adaxes installation).
The script requires PowerShell 3.0 or later.
Parameters:
- $webUIConfigurationName - Specifies the name of the Web interface whose configuration will be updated. To update the configuration of the Common Sign In page, specify CommonSignIn.
- $serviceHost - the host name of the computer where Adaxes service is installed.
- $noiseLinesCount - Specifies the number of noise lines in captcha.
PowerShell
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")
$webApplicationName = "HelpDesk" # TODO: modify me
$serviceHost = "localhost" # TODO: modify me
$noiseLevel = 10 # TODO: modify me
# Connect to the Adaxes service
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly($serviceHost)
# Prompt for credentials.
$credential = Get-Credential
# Get WebUI configuration
$webuiConfigPath = $service.Backend.GetConfigurationContainerPath("WebUIConfigurationContainer")
$webuiConfigContainer = $service.OpenObject($webuiConfigPath, $credential.UserName, $credential.GetNetworkCredential().Password, 0)
$config = $webuiConfigContainer.GetConfig($webApplicationName)
# Update autologon
$json = '{ "bruteForceProtection": {"captchaSettings": {"noiseLevel": ' + $noiseLevel + '}}}'
$config.FromJson($null, $json)
At line:27 char:1
Hello Ed,
It looks like the issue occurs because of the PowerShell version. To check the version of PowerShell you are using, execute the following script:
If you are using version 5.0, you need to update PowerShell to remedy the issue. Alternatively, please provide us with the PowerShell version you are currently using.
Hello Jake,
The script requires PowerShell 3.0 or later. Thank you for poiting this out, we added the information to the script description.
Hello Philipp,
To update the number of noise lines for the Common Sign In page, pass CommonSignIn to theĀ $webUIConfigurationName variable: