Script repository

Enable or disable specific web interface

Updated on: Jan 18, 2026, Views: 1660

Web interface configuration

The scripts enable or disable the specified web interface.

Script 1: using Adaxes scheduled task

To execute the script, create a scheduled task configured for the Domain object type and add a managed domain to the Activity Scope of the task. The domain will only be used to trigger execution of the scheduled task.

Parameters

  • $webUIConfigurationName - the name of the web interface to enable or disable.
  • $enabled - set to $true to enable the specified web interface or to $false to disable it.
$webUIConfigurationName = "HelpDesk" # TODO: modify me
$enabled = $false # TODO: modify me

# Get web interface configuration.
$webuiConfigPath = $Context.GetWellKnownContainerPath("WebUIConfigurationContainer")
$webuiConfigContainer = $Context.BindToObject($webuiConfigPath)
$webUIConfiguration = $webuiConfigContainer.GetConfiguration($webUIConfigurationName)

# Update configuration
$webUIConfiguration.Enabled = $enabled
$webUIConfiguration.SetInfo()

Script 2: external execution

Execute the script in Windows PowerShell on the computer where Adaxes service is installed. When prompted, specify the credentials of the Adaxes service account (entered during Adaxes installation).

Parameters

  • $webUIConfigurationName - the name of the web interface to enable or disable.
  • $enabled - set to $true to enable the specified web interface or to $false to disable it.
Import-Module Adaxes

$webUIConfigurationName = "HelpDesk" # TODO: modify me
$enabled = $false # TODO: modify me

# Connect to the Adaxes service.
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Get web interface configuration.
$webuiConfigPath = $admService.Backend.GetConfigurationContainerPath("WebUIConfigurationContainer")

$credential = Get-Credential
$webuiConfigContainer = $admService.OpenObject($webuiConfigPath, $credential.UserName, $credential.GetNetworkCredential().Password, 0)
$webUIConfiguration = $webuiConfigContainer.GetConfiguration($webUIConfigurationName)

# Update configuration
$webUIConfiguration.Enabled = $enabled
$webUIConfiguration.SetInfo()

Comments 0

You must be signed in to comment.

    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.