Teams – Enable users for Direct Routing PowerShell GUI

Enable-TeamsDRUsers GUI

At the time of writing it’s not possible to enable Teams Direct Routing users via Teams Admin Center, only via PowerShell commands. This PowerShell script launches a WinForms GUI that can be used by anyone. This is useful for enabling or making changes to a couple of Teams DR users.

Requirements
– Microsoft Teams PowerShell module 2.0 or above
– Teams Administrative Rights (Teams Service/Communications Administrator + Skype for Business Administrator)
– Users must have a Phone System license


The script supports very basic Teams settings such as:
– Change Voice Routing Policy
– Change Tenant Dial Plan
– Enable/Disable Enterprise Voice
– Enable/Disable Hosted Voicemail
– Set LineURI (Freetext must be prefixed tel: followed by an E164 number)

At the time of writing Connect-MicrosoftTeams does not work within WinForms, as a workaround the first time you launch the script it will prompt for credentials straight away. This supports MFA if enabled:

Connect-MicrosoftTeams authentication.

The script has a status box at the top which shows you what actions it is performing. These are also output into the PowerShell command window.

To use the script search for a user then click on the user you wish to edit. This will populate the User Settings area with the users current settings. You can then make the relevant changes and click Update to save the changes.

Note – Even though the script completes, sometimes it takes Teams a few minutes to apply some settings (i.e. Voice Policy and Dial Plan).
To remove a LineURI delete the full LineURI including tel:

Enable-TeamsDRUser – Editing a user

Once you have launched the script for the first time you can use the Disconnect button and Connect buttons to change to different Teams Tenants.

The latest version of the script can be downloaded from GitHub: https://github.com/cdhayward/Enable-TeamsDRUser

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.