VoIP:Teams:Dismantle

From VTX Public Wiki

Revision as of 13:22, 21 August 2020 by Mlr (talk | contribs) (Move section in subpage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Delete Voice Routing[edit | edit source]

Here are the commands you can use to delete the Voice Routing if you wish to migrate service somewhere else


  1. Open a powershell prompt on your PC
  2. Copy paste command below one by one changing the values in bold with your own
# Set Variables
$MSTeamsDomain = "123456.teams.ipvoip.ch"
$MSteamsAdminUser = "admin@COMPANY.onmicrosoft.com"
# Connect to Microsoft Teams management and create all Voice Routing
$Session = New-CsOnlineSession -UserName $MSteamsAdminUser
Import-PSSession $Session -AllowClobber

# Delete the Voice Routing
Remove-CsOnlineVoiceRoute -Identity "CsOnlineVoiceRoute-$MSTeamsDomain"
Remove-CsOnlineVoiceRoutingPolicy -Identity "CsOnlineVoiceRoutingPolicy-$MSTeamsDomain"
Set-CsOnlinePstnUsage -Identity Global -Usage @{Remove="CsOnlinePstnUsage-$MSTeamsDomain"}

# Logout
Get-PSSession | Remove-PSSession