Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions

Get-LyncNumberAssignment :Find #Lync Users/Objects by Phone Number/LineURI #PowerShell

Often in Lync it’s useful to understand if a number is assigned, or who/what is assigned a particular number. There isn’t really an easy way to do this out of the box. Numbers can be assigned to Users, Private Lines, Analog Devices, Common Area Phones, Exchange UM Contact Objects, Dial in Conference, Application Endpoints and Response Groups.

This script checks all these types for a number match, and outputs the data as objects allowing further manipulation.

Uses for script

    • Find out of a number is in use
    • Find all the numbers assigned from a particular range/country
    • Find all the objects in an environment with an assigned number, and their associated registrar pool (useful to see where common area, exchange UM and other contact objects home)

Download Here

You need to “dot source” the function into your session and you will need the Lync PowerShell Module. Here is the basic output


Finding all object with “+44” in their LineUri, sorting in order of LineURI and Format into a table


Finding all objects with any number assigned, Selecting Line URI, Registrar Pool and Type of Object, then sorting by type to see the different types



Hope you find it useful. Feedback welcome.


About the author

Tom Arbuthnot

A Microsoft MVP and Microsoft Certified Master, Tom Arbuthnot is Principal Solutions Architect at Microsoft Collaboration specialists Modality Systems.

Tom stays up to date with industry developments and shares news and his opinions on his blog, Microsoft Teams Podcast and email list. He is a regular speaker at events around the world.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions