Special Thanks: goes out for Mr. Jean Pavel my manager in 1&1 Internet AG for his contributions & help in writing this script, and maybe keeping my Job after what I wrote down 🙂
Important Note:To be able to use this script you need to have Synthetic Transactions account configured, you can follow instructions in this post to do that.
So I have been asked by my Manager to find a way to get a Lync Environment Report, and as we don’t have any Monitoring tool in our infrastructure that support Lync, as well as his requirements was clear
Report that tell him status of services, servers, number of users, licensing…etc.
So of course my first thought was “PowerShell Script”, so I asked my worst friend Google for help, and I found the following Lync Environment report which is an amazing script and give you detailed information about your Lync Environment, but not what a Managers are usually looking for, Managers want a nice, colorful HTML table email to be send to them daily that show them with one look summary about what happening with their Lync.
So I know that there are number of Lync PowerShell Command lines that test number of Lync Functionalities e.g.
And so on, list is long, so I start writing functions that test what is provided by our Lync infrastructure (No PSTN calls are done with our Lync so couldn’t add functions that can test peer-to-peer PSTN calls , Normalization Rules, Trunk configurations….etc.)
So Lync Environment Report test the following from the client side
- Test Peer-to-Peer A/V , A/V conferencing , Dialing Conferencing
- Test IM and Group IM
- Test Registration with our Pool
- Test Presence.
Also will check for AddressBook Services
- Downloading address book internally
- Downloading address book externally
- Address book internal query
- Address book external query
Note: In the screen shoot below I made the result of the test “Failure” to show you how failure status will be shown.
From Server Side Lync Environment Report checks the following
- Check Lync windows services on both Frontend Servers
- Check Lync windows services on Mediation Servers
- Check Lync windows services on Monitoring Servers
- Check Lync Patch Level
- Check Lync CS Management Store Replication Status
From the Money side (Most important part for Managers ) the script check for licensing , as you might already know in Lync 2010 there is no direct way to know your Licensing usage, where in Lync 2013 there is the command line “Get-CSClientAccessLicensie”.
So I had to be tricky in this section to get a final info about what and how many CALs are being used using the concept that
- Standard CALs = Lync Users on Lync Server
- PLUS CALs = Enterprise Voice Enabled users
- Enterprise CALs = Lync Users with Conferencing policy using PSTN
So I was able to include the following in the Lync Environment Report:
- Check Lync Standard CALs
- Check Lync Enterprise CALs
- Check Lync PLUS CALs
If you have little PowerShell script skills (not like me , I don’t say i’m even good in scripting 😛 ) and know your Lync PowerShell cmdlet very well, writing a script like this will not take more than couple of hours to finish.
It took me a week…..you asking why? because the HTML table result provided by our beloved PowerShell is … to be honest “Ugly”, and you must have HTML or CSS fair skills to be able to format your final table.
Lucky me, Jean does, and he showed me enough information on how to write HTML and CSS table codes.
Took me two day to learn how to implement CSS codes into PowerShell and the result was good (at least for a poorly skilled scripting guy like me)
So again you must know basic PowerShell Scripting skills to be able to use the Script.
I added inside as many notes as I can about sections that will need to be changed
- Editing the Variable $poolname = “your Lync pool FQDN”
- Editing the –computername = “your Front end servers or mediation servers or Monitoring…etc. whatever you want to test”
- Editing the To & From emails in the Sending email Function
- Editing the “smtpserver” value to point to your CAS/HT server.
Script is Version 1.0, and will keep cleaning it and editing till it better the sooner I learn something new I will reflect it in the script, also if you have more skills , HTML CSS skills that can make the script better please share it with the Lync world and don’t be selfish 🙂
Hope it help anyone out there looking for Lync Environment Report script, if any help or explanation is needed please leave a comment.