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.

Script Repository

February 24, 2021 Views: 1731

The script updates the list of object types available for Advanced Search in 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).


  • $webUIConfigurationName - Specifies the name of the Web interface whose configuration will be updated.
  • $objectTypes - Specifies an array of object types that will be added to the Advanced Search configuration.
  • $displayName - Specifies the display name for the object types specified in $objectTypes.
  • $searchByDefault - Specifies whether searching the object types will be enabled by default.
  • $visible - Specifies whether the new entry will be visible when performing Advanced Search in the Web interface.
Edit Remove

$webUIConfigurationName = "HelpDesk" # TODO: modify me
$objectTypes = @("volume") # TODO: modify me
$displayName = "Shared folders" # TODO: modify me
$searchByDefault = $True # TODO: modify me
$visible = $True # TODO: modify me

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

# Get Web Interface configuration
$webuiConfigPath = $admService.Backend.GetConfigurationContainerPath(

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

$searchSettings = $webUIConfiguration.SearchSettings
$advancedSearchObjectTypes = $searchSettings.AdvancedSearchObjectTypes
foreach ($objectType in $advancedSearchObjectTypes)
    if (@(Compare-Object $objectType.DirectoryObjectTypes $objectTypes).Length -eq 0)
        $message = "Object types array specified for: " + $objectType.DisplayName
        Write-Warning $message

# Add object type to Advanced Search
$searchObjectType = New-Object Softerra.Adaxes.Management.WebUI.Search.AdmWebUISearchObjectType
$searchObjectType.DirectoryObjectTypes = $objectTypes
$searchObjectType.DisplayName = $displayName
$searchObjectType.SearchByDefault = $searchByDefault
$searchObjectType.Visible = $visible

$advancedSearchObjectTypes += $searchObjectType
$searchSettings.AdvancedSearchObjectTypes = $advancedSearchObjectTypes
$webUIConfiguration.SearchSettings = $searchSettings

# Save the changes
Comments 0
Leave a comment

Got questions?

Support Questions & Answers