VoIP:Teams:Dismantle: Difference between revisions

From VTX Public Wiki

(Switch to version 2.0.0 of MicrosoftTeams module)
m (Text replacement - "$MSTeamsDomain" to "$TeamsDomain")
 
Line 27: Line 27:


# Set Variables
# Set Variables
$MSTeamsDomain = '''"123456.teams.ipvoip.ch"'''
$TeamsDomain = '''"123456.teams.ipvoip.ch"'''
# Connect to Microsoft Teams management
# Connect to Microsoft Teams management
Connect-MicrosoftTeams
Connect-MicrosoftTeams
# Delete the Voice Routing
# Delete the Voice Routing
Remove-CsOnlineVoiceRoute -Identity "CsOnlineVoiceRoute-$MSTeamsDomain"
Remove-CsOnlineVoiceRoute -Identity "CsOnlineVoiceRoute-$TeamsDomain"
Remove-CsOnlineVoiceRoutingPolicy -Identity "CsOnlineVoiceRoutingPolicy-$MSTeamsDomain"
Remove-CsOnlineVoiceRoutingPolicy -Identity "CsOnlineVoiceRoutingPolicy-$TeamsDomain"
Set-CsOnlinePstnUsage -Identity Global -Usage @{Remove="CsOnlinePstnUsage-$MSTeamsDomain"}
Set-CsOnlinePstnUsage -Identity Global -Usage @{Remove="CsOnlinePstnUsage-$TeamsDomain"}
# Logout
# Logout

Latest revision as of 13:32, 1 July 2022

Delete Voice Routing[edit | edit source]

Delete Voice Routing using a VTX Powershell Script VTX_Teams_Delete_Routing_Rules.ps1[edit | edit source]


  1. Download https://wiki.vtx.ch/media/VTX_Teams_Delete_Routing_Rules.ps1 on your computer ( Right Click on the link / Download )
  2. Open it with Wordpad and use Ctrl-s to save it again ( to inform the system that it is local script )
  3. Execute it on your PC : It will ask you for these parameters and delete the routing
    1. VTX Teams Domain : ex: 123456.teams.ipvoip.ch
    2. Your MS Teams Admin Credentials : ex: admin@COMPANY.onmicrosoft.com


Or Delete Voice Routing manually in Powershell Command Prompt[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
$TeamsDomain = "123456.teams.ipvoip.ch"
# Connect to Microsoft Teams management
Connect-MicrosoftTeams

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

# Logout
Disconnect-MicrosoftTeams