Skip to content

IAdmConfigurationSetSettings2

The IAdmConfigurationSetSettings2 interface extends the IAdmConfigurationSetSettings interface.

Inheritance: The IAdmConfigurationSetSettings2 interface inherits from the IAdmConfigurationSetSettings interface.

Methods

Details

GetServicesDnsHostNames()

Gets DNS host names of all Adaxes services that belong to the configuration set.

String[] GetServicesDnsHostNames()

Examples

The following example outputs DNS host names of Adaxes services belonging to the same configuration set as the service installed on the local computer.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

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

# Bind to the 'Configuration Set Settings' container
$configSetSettingsPath = $admService.Backend.GetConfigurationContainerPath("ConfigurationSetSettings")
$configSetSettings = $admService.OpenObject($configSetSettingsPath, $NULL, $NULL, 0)

# Output DNS host names
Write-Host "Service names:"
$hostNames = $configSetSettings.GetServicesDnsHostNames()
foreach ($name in $hostNames)
{
    Write-Host "`t" $name
}
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi.Management;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;

class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        // Bind to the 'Configuration Set Settings' container
        String configSetSettingsPath = admService.Backend.GetConfigurationContainerPath(
            "ConfigurationSetSettings");
        IAdmConfigurationSetSettings2 configSetSettings =
            (IAdmConfigurationSetSettings2)admService.OpenObject(
            configSetSettingsPath, null, null, 0);

        // Output DNS host names
        Console.WriteLine("Service names:");
        String[] hostNames = configSetSettings.GetServicesDnsHostNames();
        foreach (String name in hostNames)
        {
            Console.WriteLine("\t" + name);
        }
    }
}

Requirements

Minimum required version: 2013.2

See also