SOLVED

Bulk Change Conference Toll Number?

Bronze Contributor

Can you use powershell to change existing users' default conference bridge?

 

we have several hundred users who were assigned a toll number for 415 area code and we want to change all existing users default toll number to be something closer.

 

It appears you can do the bulk change in the graphical interface... trying to speed it up by using powershell.

 

So far have been unsuccessful using set-csuseracp.

 

Get-CsUserAcp joe | set-csuseracp -TollNumber 14692700098 -ParticipantPasscode 0 -Name Microsoft -Domain
resources.lync.com -Url https://dialin.lync.com/577d82e2-5d35-43bb-a570-9ac75c112423

 

This failed to change the existing toll number, in fact, it added it to the existing one. Take a look:

Before Change:

AcpInfo            : {<acpInformation default="true">
                       <tollNumber>12135146314</tollNumber>
                       <tollFreeNumber>18553367707</tollFreeNumber>
                       <participantPassCode>0</participantPassCode>
                       <domain>resources.lync.com</domain>
                       <name>Microsoft</name>
                       <url>https://dialin.lync.com/577d82e2-5d35-43bb-a570-9ac75c112423</url>
                     </acpInformation>}

 

After Change:

AcpInfo            : {<acpInformation>
                       <tollNumber>14692700098</tollNumber>
                       <participantPassCode>0</participantPassCode>
                       <domain>resources.lync.com</domain>
                       <name>Microsoft</name>
                       <url>https://dialin.lync.com/577d82e2-5d35-43bb-a570-9ac75c112423</url>
                     </acpInformation>, <acpInformation default="true">
                       <tollNumber>12135146314</tollNumber>
                       <tollFreeNumber>18553367707</tollFreeNumber>
                       <participantPassCode>0</participantPassCode>
                       <domain>resources.lync.com</domain>
                       <name>Microsoft</name>
                       <url>https://dialin.lync.com/577d82e2-5d35-43bb-a570-9ac75c112423</url>
                     </acpInformation>}

 

Now what's worse is I can't seem to remove the extra line... it errors out when trying to clear it out.

remove-CsUserAcp -identity joe -Name Microsoft -TollNumber 14692700098
Object reference not set to an instance of an object.
    + CategoryInfo          : NotSpecified: (:) [Remove-CsUserAcp], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Rtc.Management.AD.Cmdlets.RemoveOcsUserAcpCmdlet
    + PSComputerName        : admin1a.online.lync.com

6 Replies

Get-CsUserAcp joe | remove-csuseracp will just clear the existing acp info (including the duplicate issue). You can then set, but would also need to add the -tollnumber

Getting closer.

Get-CsUserAcp joe | remove-csuseracp

^^ This does indeed clear out everything. In powershell and in the GUI, the conference numbers are blank after this command has been run.

 

However, when I run the next command, then the 469 area code toll number does not "stick" instead after a few minutes, the originally assigned number (12135146314) re-appears. 

Get-CsUserAcp joe | set-csuseracp -TollNumber 14692700098 -ParticipantPasscode 0 -Name Microsoft -Domain
resources.lync.com -Url https://dialin.lync.com/577d82e2-5d35-43bb-a570-9ac75c112423

 

This makes me thing it is not possible to do a bulk change of the conferencing phone number via powershell - has anyone successfully done this or is it only possible in the GUI?

 

Hi Joe,

I might have misinterpreted this, but I'm not sure Set-CsUserAcp is called for here, would Set-CsOnlineDialInConferencingUser not achieve what you're after? CsUserAcp is for the configuration of Audio Conferencing Providers, not the assignment numbers to users. All you need is for the new number to existing as a service / conferencing number in your tenant already.

 

Get-CsOnlineDialInConferencingUser -Identity "ben@gecko-studio.co.uk" outputs the conferencing information for myself, and I can see the service number which is my currently assigned default conferencing number.

 

So in your instance the following would update joe's number to 4414692700098;

set-CsOnlineDialInConferencingUser joe -ServiceNumber 4414692700098

You might also choose to use the -sendemail parameter to prevent users receiving another welcome to PSTN conferencing email when you update their number.

 

Here's the kicker though; I've tried to do this in bulk and hit a wall - Ordinarily I'd use something similar to the below in order to filter all users with a particular conferencing number, and then replace that number (fictional numbers used);

get-CsOnlineDialInConferencingUser | Where-Object {$_.servicenumber -eq 442033215256} | Set-CsOnlineDialInConferencingUser -ServiceNumber "4417526868635"

 

In my head this should retrieve all users who currently have conferencing numbers of 442033215256 and replace that number with 4417526868635, but I receive the below response;

WARNING: The user cannot be found or does not belong to the specified tenant.

 

I've included the below screenshot for reference which has 3 commands. First one proving that the retrieving by filter works, second one attempting to update the retrieved results which fails, and the third one proving that it work fine by individually specifying the identity.

 

I only had a short time to look at this, but yeah it'd seem somethings a bit out of whack with bulk updates to conferencing number assignment. Let me know if I'm way off, but it'd appear that even this approach has a problem - I'll have a further look later on perhaps.

 

conf.PNG

Good Call Ben, this worked for me: 

Get-CsOnlineDialInConferencingUser michael | %{Set-csOnlineDialInConferencingUser -identity $_.sipaddress.substring(4) -ServiceNumber 1##########}

I instantly received the  "Your Office 365 Dial-In Conferencing information has changed", and immediately booking a Skype meeting had the new details.

best response confirmed by Joe Stocker (Bronze Contributor)
Solution

Ah spot on, thanks Michael.

 

So Joe, based on what Michael's bought to the table there, you can use the below to update users conferencing numbers in bulk, where XXXXXXXX is the existing number, and YYYYYYYY is the number you want to replace it with.

 

get-CsOnlineDialInConferencingUser | Where-Object {$_.servicenumber -eq XXXXXXXX} | %{Set-CsOnlineDialInConferencingUser -identity $_.sipaddress.substring(4) -ServiceNumber YYYYYYYY}

 

You might want to run just the GET part of the command on its own first to ensure it pulls back the expected users for you. I've tested this and it works fine.

Thank you! This worked perfectly!
I also noticed a new command which appears to be in preview, if you run get-CsOnlineDialInConferencingUser there is an on/off switch for whether a user can use the Toll Free numbers - very cool! Says I can't use it because I am not in the preview program. Can't wait till that rolls out!
1 best response

Accepted Solutions
best response confirmed by Joe Stocker (Bronze Contributor)
Solution

Ah spot on, thanks Michael.

 

So Joe, based on what Michael's bought to the table there, you can use the below to update users conferencing numbers in bulk, where XXXXXXXX is the existing number, and YYYYYYYY is the number you want to replace it with.

 

get-CsOnlineDialInConferencingUser | Where-Object {$_.servicenumber -eq XXXXXXXX} | %{Set-CsOnlineDialInConferencingUser -identity $_.sipaddress.substring(4) -ServiceNumber YYYYYYYY}

 

You might want to run just the GET part of the command on its own first to ensure it pulls back the expected users for you. I've tested this and it works fine.

View solution in original post