Monday, April 2, 2012

Listing all deployed numbers in Lync

Even though all the numbers can be found through the CSCP og powershell, I have customers who do not want to remember commands, or just want a list (print out) of all the numbers which has been assigned to users, devices and services.

And for that exact reason, I have created a simple script to gather this information, and to publish it in a html file. The script and commands used here are pretty basic, but it could be extended to include more properties or other "get-commands".

The script looks something like this:


I shouldn't need much explanation, but for those of you who have not created html files through "convert-html" before I'l write a line or two about the file construct.

All HTML files will need a head and a body element, and this is the first thing I create in this script. Once this is in place, you can have control over colors, sizes, frames, borders or whatever you feel like tweaking.

There is another way to construct your html, and it can be found here (this is where I found the inspiration): http://technet.microsoft.com/en-us/library/ff730936.aspx it will give you a better description of the convert-html command than I can do. However, there is a downside to use the -head and -body in more than one output line, you will get several html and body constructs in your output file, which is why I create the head and body first, and then use the -fragment switch in my convert-html statements. (I like it nice and clean)

The script can be found here.

Did I miss any numbers or do you see room for improvements? Please let me know.