PowerShell – Teams Phone number Assignment

Microsoft Teams is hot in all organizations so is it with our clients who are migrating their telephone numbers to Teams from physical desk phones.

This script is a part of different scripts that we had used for this migration project.

It has been requested by our telecom team to create scripts for license assignment, usage location update, emergency location update and Phone number assignment.

We are sharing the Phone Number assignment script as this is generic and can be used by others, other scripts are company specific.(we will share them later by generalizing them)

Here is the GitHub link for downloading this script

Teams Phone number Assignment

Feed this Script with a CSV file in below format (example CSV is also there in ZiP folder)


Note: Plus (+) sign is mandatory for number format and can get lost if you save CSV in excel.

When using excel use apostrophe () to save it.


Now when you have your excel ready, just execute the script as

.\TelecomAssignNumbersAssignment.ps1 -CSV csvfile.csv -domain tenantname

Tenant name is the part before onmicrosft.com of your tenant. (this is required for making a Skype for Business online connection to your tenant)

.\TelecomAssignNumbersAssignment.ps1 -CSV csvfile.csv -domain techwizard

On first run, script will create logs and report folder. (report will be in CSV form which will show success as well as error in status column)


 

Thanks for reading and downloading…

Tech Wizard

https://techwizard.cloud

https://syscloudpro.com/

 

 

Leave a comment