List Lync Users – automated Excel file

Standard

(Have a look at the newer, smarter, prettier, fancier version of this script here.)

This script isn’t big news, but it’s very handy and easy to use.
It allows you to remotely connect to one of your pools and create an Excel sheet, populated with the following:

Display Name SIP Address Registrar Pool Enterprise Voice Line URI

It’s basically a list you can hand to your customers and colleagues so they can keep track of changes.
Additionally, it helps spot Enterprise Voice enabled users that don’t have a Line URI or it’s misconfigured.

When you run the script it’ll ask your for your Credentials – You must Have appropriate Lync permissions:

Credentials

It will then ask you for the FQDN of your Lync server or pool and will attempt to connect:

Lync Server

When connected, the script will immediately start creating the Excel file:

Creating Excel2

You can scroll up and down the Excel file but do not click anywhere on the spreadsheet. This causes the automated build to crash, and you’ll have to restart the script.

When completed, the script will notify you and close the remote PowerShell session it initiated.

Script Done

The pace is approx. a second per line, so if you have 5000 users this is the time to go and grab a cup of coffee.

The script can be downloaded here.

Updated October 7, 2014: Version 2.0 checks for your PS version. This script will only run on PS 3.0 or higher.

Advertisements

14 thoughts on “List Lync Users – automated Excel file

  1. I just tried to run and here’s what I get

    File D:\Users\xxxx\Desktop\LyncUsersExcel.ps1 cannot be loaded. The file D:\Users\xxxx\Desktop\LyncUsersExcel.p
    s1 is not digitally signed. The script will not execute on the system. Please see “get-help about_signing” for more det
    ails..
    At line:1 char:45
    + D:\Users\abdelham\Desktop\LyncUsersExcel.ps1 <<<<
    + CategoryInfo : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

  2. found the file was blocked by explorer as protection
    when unblocked I ran the script and here’s what I got

    Missing property name after reference operator.
    At D:\Users\xxxx\Desktop\LyncUsersExcel.ps1:23 char:43
    + Write-Host Connecting to Pool $LyncServer. <<<< .. -ForegroundColor Yellow
    + CategoryInfo : ParserError: (.:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingPropertyName

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