Reset personal web interface settings

In Adaxes web interface, each user has the following personal settings that they can change:

Setting Default value
Interface language <Auto>
Web interface theme Light
Default start page <Auto>
Don't show the execution log if an operation succeeds Disabled

You can reset the settings of a specific user by executing the following script.

Only Adaxes service administrators have the rights to reset personal web interface settings.

In the script:

  • $serviceHost – the host name of the computer where the Adaxes service is installed.

  • $userDN – the distinguished name (DN) of the user to reset settings for. For information on how to get the DN, see Get the DN of a directory object.

  • $webUiName – the name of the web interface (the one used in the web interface URL, not the display name).

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$serviceHost = "localhost"
$userDN = "CN=John Smith,OU=Users,DC=company,DC=com"
$webUiName = "SelfService"

# Connect to the Adaxes service.
$ns = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$service = $ns.GetServiceDirectly($serviceHost)

# Prompt for credentials.
$credential = Get-Credential

# Bind to the user.
$user = $service.OpenObject("Adaxes://$userDN", $credential.UserName,`
    $credential.GetNetworkCredential().Password, 0)

# Reset user settings.
$user.ReadProperties()
$user.SetProperty("WebUISettings.$webUiName", $null)
$user.SetProperty("UserUISettings", $null)

# Save the changes.
$user.WriteProperties()