Script Repository


Assign Conferencing Policy in Skype for Business On-Premises

June 06, 2017
1740

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
See Also: Assign Conferencing Policy in Skype for Business Online.

Comments ( 0 )
No results found.
Leave a comment