MS Teams Powershell Direct Routing Bulk Configuration


   * Windows Powershell ISE w/ MS Teams Module installed

   * MS Teams Administrator Access




  •      Download and add MS Teams direct routing user information to the teams_userlist.csv file (see attachment)

Note: Follow existing format on LINE1

  •     Save the file in local desktop and take note of directory file path



  •      Open Powershell ISE as an Administrator and connect to MS Teams


  • Connect to MS Teams by running the following command: 


  •  Verify Voice routing policy name by running the following command:


        Note: Take note of the voice routing policy and may need to update the powershell command when provisioning Teams Direct Routing users

  • Run the following command w/ the correct voice routing policy name and teams_userlist.csv file path:

$csv = Import-Csv file path here

foreach ($line in $csv) {

Set-CsPhoneNumberAssignment -Identity $line.Email -PhoneNumber $line.Number -PhoneNumberType DirectRouting

Grant-CsOnlineVoiceRoutingPolicy -Identity $line.Email -PolicyName "US Only”








Have more questions? Submit a request


Powered by Zendesk