Picture the scenario where you need to change the default dial-in conferencing number for only part of the users within a tenant. That’s fine to do it manually if the numbering does not exceed 5-10 users, but we, IT guys, are lazy, so we’re going to do it from PowerShell anyway.
Needless to say that as pre-requisites you’ll have to have preferrably a Global Admin account and the Skype for Business Online Module for Powershell up and running:
First, make sure you have the Skype Online Connector installed. Get it from here.
Now, once the connector is installed on your machine, you can run all 4 lines at once in your PowerShell:
$credential = get-credential
Import-Module SkypeOnlineConnector
$lyncSession = New-CsOnlineSession -Credential $credential
Import-PSSession $lyncSession
If you didn’t see “red” in front of your eyes, it means you’re on the right track. If you did, you might want to run over some MVA courses available here
Now, we need a common attribute to collect in a variable all users for which we want to change the default Dial-in Conferencing number. In my lab, i’ve done this by querying the old number which I want to replace:
$user1 = Get-CsOnlineDialInConferencingUser | Where-Object {$_.ServiceNumber -ieq “old number here”}
Just to make sure we’re on the right track, we can call out the variable in order to check it’s contents.
Next step is to do a foreach loop here, changing the Dial-in Conferencing number for each object caught in our variable:
$user1 | foreach {Set-CsOnlineDialInConferencingUser -Identity $_.sipaddress -ServiceNumber “new number here”}
We have just sucesfully replaced one dial-in conferencing number with another for selected users.
Sabin.