Hello,
Yes, it is possible. You will need to add the volume object type to the Advanced Search configuration using the below script. Execute the script in Windows PowerShell on the computer where Adaxes service is installed. When prompted, specify the credentials of the Adaxes service account.
In the script:
- $webUIConfigurationName - specifies the name of the Web Interface configuration of which 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.
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")
$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(
"WebUIConfigurationContainer")
$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
return
}
}
# 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
$webUIConfiguration.SetInfo()