Lync Tip: List Lync users with LineURI’s to CSV

Using the Get-CsUser cmdlet you can get information about Lync users in your organization.

The below powershell command exports Lync users, sip address, Enterprise Voice Enabled and Line URI to a CSV file.

Get-Csuser | Select-Object DisplayName, SipAddress, EnterpriseVoiceEnabled, LineUri | Export-Csv -Path c:LyncUsers.csv

 

3 Replies to “Lync Tip: List Lync users with LineURI’s to CSV”

  1. Hi! This will populate the CSV with LineURI value in tel:+11234567890;ext=7890 format. What if I wanted to format the value for LineURI in (123) 456-7890 format?

    • Hi Shah,

      You could probably do this in PowerShell, but the easiest way is probably just to add another column in the Excel sheet with the following formula (assuming all of your LineURI’s are in this format):

      =CONCATENATE(“(“,MID(D1,7,3),”)”,” “,MID(D1,10,3),”-“,MID(D1,13,4))

      This formula basically:

      Starts with a “(”
      Adds characters 7,8 and 9 (from the LineURI column, D)
      Adds a “)”
      Adds a space ” ”
      Adds characters 10,11,12
      Adds a “-”
      Adds characters 13,14,15 and 16

      Just tested and this formats “tel:+11234567890;ext=7890” in to “(123) 456-7890”

      Regards

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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