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 Execution Log when operation succeeded Disabled

You can reset the settings for an individual user by executing the below 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()