MS Teams Powershell Direct Routing Bulk Configuration

Requirements:

   * Windows Powershell ISE w/ MS Teams Module installed

   * MS Teams Administrator Access

 

 

Step1:

  •      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

 

Step2: 

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

   

  • Connect to MS Teams by running the following command: 

       Connect-MicrosoftTeams

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

        Get-csonlinevoiceroutingpolicy

        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

Comments

Powered by Zendesk