Update 2019
Starting with Adaxes 2019.1 you can check all the services sharing common configuration in the Administration console. For details, have a look at the following help article: https://www.adaxes.com/help/MultiServerEnvironment.
Original
Hello,
Here's a sample script that updates the Execution Log with DNS host names of all Adaxes services that belong to the same configuration set as the Adaxes service where the script is run. The script can be run as a part of a Business Rule, Custom Command or Scheduled Task.
$configurationSetSettingsPath = $Context.GetWellKnownContainerPath("ConfigurationSetSettings")
$configurationSetSettings = $Context.BindToObject($configurationSetSettingsPath)
$dnsHostNames = $configurationSetSettings.GetServicesDnsHostNames()
foreach ($dnsHostName in $dnsHostNames)
{
$Context.LogMessage($dnsHostName, "Information")
}
Here's a version of the same script that outputs the DNS host names on the PowerShell console. To be able to run the script, you need to be logged in to Windows as an Adaxes Service Administrator.
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")
$admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$admService = $admNS.GetServiceDirectly("localhost")
$configurationSetSettingsPath = $admService.Backend.GetConfigurationContainerPath("ConfigurationSetSettings")
$configurationSetSettings = $admService.OpenObject($configurationSettingsPath, $NULL, $NULL, 0)
$dnsHostNames = $configurationSetSettings.GetServicesDnsHostNames()
Write-Host "Adaxes services that belong to the current configuration set:"
foreach ($dnsHostName in $dnsHostNames)
{
Write-Host "`t$dnsHostName"
}