Skype for Business – Bulk Set Client Pin

Note this script is provided as an example only – By default a user can set their own Client Pin via the Dial-In Conferencing page (usually dialin.domain.com).

You may have a requirement to bulk set a Client Pin if you’re rolling out a large number of VOIP phones.   The script example below sets a 6 digit client PIN consisting of a two digit prefix followed by the last 4 digits of the users LineUri:

# Set a pin prefix
$PinPrefix = "33"

# This will set all users pins to the Pin Prefix and last 4 digits of their LineURI

$users = Get-CsUser -Filter {EnterpriseVoiceEnabled -eq $True}

ForEach ($user in $users){
    
    $ext = ""

    Write-Host $USER.SipAddress
    Write-Host $USER.LineUri

    $ext = $($user.LineUri).substring($($user.LineUri).length -4,4)

    Write-Host $pinprefix$ext

    $user | Set-CsClientPin -Pin $pinprefix$ext
} 

You can amend the “$users = Get-CsUser ” line to filter for users to suit your need (i.e an OU) or if you need to bulk set pins on Common Area Phones.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.