IAdmConfigurationSetSettings2
The IAdmConfigurationSetSettings2 interface extends the IAdmConfigurationSetSettings interface.
Inheritance: IAdmConfigurationSetSettings
Methods
-
Method
-
Description
-
GetServicesDnsHostNames()
-
Gets DNS host names of all Adaxes services that belong to the configuration set.
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.
- PowerShell
-
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi") # Connect to the Adaxes service $ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace" $service = $ns.GetServiceDirectly("localhost") # Bind to the 'Configuration Set Settings' container $configSetSettingsPath = $service.Backend.GetConfigurationContainerPath("ConfigurationSetSettings") $configSetSettings = $service.OpenObject($configSetSettingsPath, $null, $null, 0) # Output DNS host names Write-Host "Service names:" $hostNames = $configSetSettings.GetServicesDnsHostNames() foreach ($name in $hostNames) { Write-Host "`t" $name }
- C#
-
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 ns = new AdmNamespace(); IAdmService service = ns.GetServiceDirectly("localhost"); // Bind to the 'Configuration Set Settings' container string configSetSettingsPath = service.Backend.GetConfigurationContainerPath( "ConfigurationSetSettings"); IAdmConfigurationSetSettings2 configSetSettings = (IAdmConfigurationSetSettings2)service.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