This PowerShell script which collects assigned and unassigned phone numbers from Microsoft Teams and shows you where they are used. The script supports Users, Meeting Rooms, Online Application Instances (Resource Accounts) and Dial-in Conference numbers.
The script can output the results to the console or to a CSV.
Note: A version of my script that has been enhanced by Ruud van Strijp is available here. Extra features at the time of writing:
- Changed login method and file save location. Added HTML export by default
- Added UPN. Added HTML table width for better readability
- Added EV columns; Calling and Voice Routing Policies
- Changed for module 3.0.0
- Get Dial Plan, fix first name, merge Resource Account and User, make table wider