Script repository

Preserve name of assigned Conferencing policy

Updated on: Jan 18, 2026, Views: 4962

Skype for Business

The script preserves the name of assigned Skype for Business Conferencing policy in a user property. To execute the script, create a business rule, custom command or scheduled task configured for the User object type.

Parameters

  • $skypeServer - the fully-qualified domain name (FQDN) of your Lync Server.
  • $propertyName - the name of the property that will be used to store the Conferencing policy name.
$skypeServer = "lyncserver.domain.com" # TODO: modify me
$propertyName = "adm-CustomAttributeText1" # TODO: modify me

try
{
    # Connect to the Lync Server
    $sessionOptions = New-PSSessionOption -SkipRevocationCheck -SkipCACheck -SkipCNCheck
    $session = New-PSSession -ConnectionUri https://$skypeServer/ocspowershell `
        -SessionOption $sessionOptions -Authentication NegotiateWithImplicitCredential

    Import-PSSession -session $session
    
    # Get the Conferencing Policy
    $conferencingPolicy = (Get-CsUser -Identity "%userPrincipalName%").ConferencingPolicy
    
    # Update the attribute
    $Context.TargetObject.Put($propertyName, $conferencingPolicy)
    $Context.TargetObject.SetInfo()
}
finally
{
    # Close the remote session and release resources
    Remove-PSSession -Session $session
}

Comments 0

You must be signed in to comment.

    Got questions?

    Support Questions & Answers

    We use cookies to improve your experience.
    By your continued use of this site you accept such use.
    For more details please see our privacy policy and cookies policy.