My work at Modality Systems often has me doing health checks for customer Lync environments. These can be due to customer requests, or as part of our onboarding for new managed support customers. If you’ve ever had an Active Directory Risk Assessment Program (ADRAP) or Exchange Risk Assessment Program (ExRAP), it’s quite similar. Lots of tasks to run, lots of data to sift through. So it’s always beneficial to standardize and automate the steps to get the data. The same is the case when you’re responsible for your own environment and want to ensure good health.
Just like Get-CsDatabaseUpdateStatus.ps1, Dave Howe from the Lync product group and I teamed up to automate something. In this case, it’s looking at what Cumulative Updates are installed on each server throughout a Lync environment. This script queries each pool, then finds what servers are part of that pool, and queries each server to find the CU that’s installed. It then provides an easy to read output of the entire environment (with exceptions) for easy review. As shown below, we see three multi-server pools, the version number and “friendly” Cumulative Update info.
The script works fine with Standard Edition servers as well:
In the first example, you see that the first two servers show “PSRemoting failure”. This is because the script uses PowerShell Remoting to connect to each remote server to query information (see installation notes below). PSRemoting doesn’t really work the same when dealing with non-domain joined machines, such as the first two, which are edge servers. So the script isn’t able to communicate with them via PSRemoting, and flags them. If the script can’t ping a server, it will show as “offline”. The friendly name of the CU shown is coded in the script. So I’ll update it each time a new CU is released.
By default, the script checks all pools. But you can specify a single pool by using the -PoolFqdn parameter.
Get-CsUpdateVersion.ps1 [[-PoolFqdn] ] [-WhatIf] [-Confirm] 
This script uses PowerShell Remoting to query remote servers. PSRemoting is enabled by default on Windows Server 2012 and later, but disabled by default on 2008 R2. To enable PSRemoting on 2008 R2 servers, see Enable-PSRemoting.
Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.
v1.6 – 12-12-2014 – Get-CsUpdateVersion.v1.6.zip
v1.5 – 11-21-2014 – Get-CsUpdateVersion.v1.5.zip
v1.4 – 09-24-2014 – Get-CsUpdateVersion.v1.4.zip
v1.3 – 09-02-2014 – Get-CsUpdateVersion.v1.3.zip
v1.2 – 08-07-2014 – Get-CsUpdateVersion.v1.2,zip
v1.1 – 06-02-2014 – Get-CsUpdateVersion.v1.1.zip
v1.0 – 05-02-2014 – Get-CsUpdateVersion.v1.0.zip
See the changelog for information on what’s changed/included in each version.