Skip to content

IAdmManagedDomainLyncOps2

The IAdmManagedDomainLyncOps2 interface extends the IAdmManagedDomainLyncOps interface with the ability to retrieve Skype for Business policies.

Inheritance: The IAdmManagedDomainLyncOps2 interface inherits from the IAdmManagedDomainLyncOps interface.

Methods

Details

GetAvailableLyncPolicies()

Returns identities of Skype for Business policies of the given type.

String[] GetAvailableLyncPolicies(String poolFqdn, ADM_LYNCPOLICY_ENUM type)

Parameters

  • poolFqdn - Specifies the fully qualified domain name (FQDN) of the Skype for Business Registrar pool.
  • type - Specifies the type of Skype for Business policies.

Return value

The method returns identities of per-user policies only.

Examples

The following code sample outputs identities of conferencing Skype for Business policies.

[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 managed domain
$domainName = "example.com"
$managedDomainsPath = $admService.Backend.GetConfigurationContainerPath("ManagedDomains")
$managedDomainsPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" $managedDomainsPath
$managedDomainPath = $managedDomainsPathObj.CreateChildPath("DC=$domainName")
$managedDomain = $admService.OpenObject($managedDomainPath, $NULL, $NULL, 0)

# Retrieve policy identities
$registrarPoolFqdn = "myregistrarpool.example.com"
$policiesType = "ADM_LYNCPOLICY_CONFERENCING"
$policyIdentities = $managedDomain.GetAvailableLyncPolicies($registrarPoolFqdn, $policiesType)

Write-Host "Policies:"
foreach ($policyIdentity in $policyIdentities)
{
    Write-Host "`t" $policyIdentity
}
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi;
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 managed domain
        const String domainName = "example.com";
        string managedDomainsPath = admService.Backend.GetConfigurationContainerPath(
            "ManagedDomains");
        AdsPath managedDomainsPathObj = new AdsPath(managedDomainsPath);
        AdsPath managedDomainPath = managedDomainsPathObj.CreateChildPath("DC=" + domainName);
        IAdmManagedDomainLyncOps2 managedDomain = (IAdmManagedDomainLyncOps2)admService.OpenObject(
            managedDomainPath.ToString(), null, null, 0);

        // Retrieve policy identities
        const String registrarPoolFqdn = "myregistrarpool.example.com";
        ADM_LYNCPOLICY_ENUM policiesType = ADM_LYNCPOLICY_ENUM.ADM_LYNCPOLICY_CONFERENCING;
        var policyIdentities = managedDomain.GetAvailableLyncPolicies(
            registrarPoolFqdn, policiesType);
        foreach (string policyIdentity in policyIdentities)
        {
            Console.WriteLine(policyIdentity);
        }
    }
}

Requirements

Minimum required version: 2018.1

See also