Script repository

Update the number of noise lines in captcha

Updated on: Jan 18, 2026, Views: 2621

Web interface configuration

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).

Parameters

  • $webUIConfigurationName - the name of the web interface to update. 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 - the number of noise lines to set for captcha.
Import-Module Adaxes

$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)

Comments 6

You must be signed in to comment.

  • Ed

    Ed

    When I run this I get an error when trying to save the configuration :Cannot find an overload for "SetInfo" and the argument count: "0".
    At line:27 char:1

  • Support

    Support

    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:

    $PSVersionTable
    

    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.

    • Jake

      Jake

      Can you publish the supported version of PowerShell for this script?

      • Support

        Support

        Hello Jake,

        The script requires PowerShell 3.0 or later. Thank you for poiting this out, we added the information to the script description.

  • Philipp

    Philipp

    What is the Name of the common sign in web interface? I need to change the captcha there.

    • Support

      Support

      Hello Philipp,

      To update the number of noise lines for the Common Sign In page, pass CommonSignIn to the $webUIConfigurationName variable:

      $webUIConfigurationName = "CommonSignIn" # TODO: modify me
      

Got questions?

Support Questions & Answers

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.