Skype for Business Online - Additional Emergency Locations in PowerShell


Assigning a phone number to a user in Skype for Business Online requires you to first assign an Emergency Location. The Emergency Location is used for saftety and liability purposes in case someone were to dial an emergency number (ex: 911 in the USA). The location is sent to the PSAP (Public Safety Access Point, i.e. police, firefighter, ambulance, etc) so they can show up to the correct address and provide help.

Take a look at the picture below from my tenant. Notice under 'Dallas,' my address is listed.  Underneath 'Dallas' is my actual apartment number (all addresses blacked out for privacy). Skype for Business Online allows for a parent/child relationship with Emergency Locations. For example, if there are multiple floors in a building, you could create a parent location of 'Minneapolis Office' with each floor of the building as a child item (Floor 1, Floor 2, etc).


While this flexibility is great, it presents problems when assigning Emergency Locations in bulk for new users. Lets say I want to assign 50 users to an additional location listed under 'Dallas' above. I haven't found a good way to bulk assign locations in the admin panel, so I'm going to use PowerShell instead.

The command 'Get-CsOnlineLisCivicAddress' lists all Emergency Locations with one cavaet - it doesn't list any of the 'additional locations'. Why? I have no clue, and frankly, it's kind of annoying. So how do we get the list of additional locations? Here's a command I've found useful:

Get-CsOnlineLisLocation|Where-Object {$_.location -ne $null}|ft description, location

When I run this command on my tenant, here's what I see for my apartment in Dallas:


So, how do I assign additional users to this location? The 'Set-CsOnlineVoiceUser' cmdlet takes a'locationid' object.I can get the'locationid' from the 'Get-CsOnlineLisLocation' cmdlet in our previous step and set the 'location' object to be the location I found running the 'Get-CsOnlineLisLocation' command above:



Now we can use the 'locationid' within the 'Set-CsOnlineVoiceUser' cmdlet to set the Emergency Location for a user to an additonal location listed underneath an Emergency Location:Set-CsOnlineVoiceUser -identity joshc -telphonenumber +19725551212 -location id 87b77092-4945-9824-38ada04012e7


If anyone has found a better way of dealing with 'additional locations' within PowerShell, feel free to leave a comment below.

0 Comments