Lync Enterprise Voice oneliner: Find users with LineURI from a specific country

This oneliner helps you to find all users that has a LineURI defined in a Lync deployment

Get-CsUser -Filter {LineURI -like “tel:+47*”} | Sort-Object -Property LineUri | Format-Table Displayname,LineURI -AutoSize

  • Get-CsUser -Filter {LineURI -like “tel:+47*”}
    • Gets all the users with a LineUri defined with the +47 countrycode
    • -like requres that the number starts with tel:+47 wich is the start of a norwegian lineuri
    • -Filter  will get just the users we are interested in as is less resource intensive than Where-Object
  • | Sort-Object-PropertyLineUri
    • Takes the object from previous cmldet and sorts the object on the LineURI attribute
    • Will list all phone numbers in the correct order
  • | Format-TableDisplayname,LineURI-AutoSize
    • formats the output where we display the name of the user and the LineURI the user has
Advertisements

2 thoughts on “Lync Enterprise Voice oneliner: Find users with LineURI from a specific country

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s