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.

Script repository

Assign Conferencing Policy in Skype for Business On-Premises

May 11, 2021 Views: 3424

The script can be used in business rules, custom commands or scheduled tasks to assign a Lync Conferencing Policy to an AD user. For example, to assign a policy to new users, you need to create a business rule triggered automatically once a new user is created. For more information on how to automatically run a script once a new user is created, see Run PowerShell Script after Creating a User.

Parameters:

  • $lyncServer - Specifies the fully qualified domain name (FQDN) of the Lync Server where the operation must be performed.
  • $policyName - Specifies the name of the Conferencing Policy to assign.
Note: To be able to assign a policy, the user account that is used to run the script must be assigned to the CsUserAdministrator role or the CsAdministrator role in Lync.
Edit Remove
PowerShell
$lyncServer = "lyncserver.domain.com" # TODO: Modify me
$policyName = "SalesConferencingPolicy"

$sessionOptions = New-PSSessionOption -SkipRevocationCheck -SkipCACheck -SkipCNCheck
$session = New-PSSession -ConnectionUri https://$lyncServer/ocspowershell `
    -SessionOption $sessionOptions -Authentication NegotiateWithImplicitCredential

Import-PSSession -session $session

Grant-CsConferencingPolicy -identity "%userPrincipalName%" -PolicyName $policyName

Remove-PSSession -Session $session
Comments 0
Leave a comment
Loading...

Got questions?

Support Questions & Answers