Script Overview
This script queries Microsoft Teams for assigned numbers and displays them in a formatted table with the option to export to CSV.
During processing LineURI’s are run against a regex pattern to extract the DDI/DID and the extension to a separate column.
This script collects Microsoft Teams objects including: Users, Meeting Rooms, Online Application Instances (Resource Accounts).
Download
Download the script over on GitHub.
This script does not collect objects from on-premises environments even if in hybrid, instead use this script.
thanks, very helpful
Glad its useful 🙂
Thank very much for posting this. Extremely useful. I have already started using it.
Is there another script that could show all the unassigned numbers only?
Many thanks,
Robbie
Thanks for your feedback. Are you looking for something that maintains a database of all your phone numbers and tracks what is and isn’t assigned? I built something like that for SfB, but I havent ported it to Teams yet.
Thank you very much for the reply. I have used the script of yours which is amazing. What I am looking for is a script which list all unassigned numbers to assigned to new staff members. However, that script you mentioned about the database of phone numbers and tracks what is and isn’t assigned, sounds amazing.
Looking forward to your reply.
possible you can add or I could add the usage location and SAM account name?
Yep I will try get that added asap.