This post was originally published here

To finalize this series of posts about how to check what BizTalk Server <version> Cumulative Updates are installed in your Servers with PowerShell:

We just need to talk about BizTalk Server 2013 to cover the last 4 versions of the product. And I know some environments that still are running in this version, for this reason, it is still a valid and quite useful script.

This script is very similar to the script that I created for BizTalk Server 2010 because, in earlier versions, such as BizTalk Server 2010 and 2013, there were dedicated versions for BizTalk Server and BizTalk Adapter Pack. This has changed since BizTalk Server 2013 R2 where Microsoft decide to create Cumulative Updates for BizTalk Server, Adapter Pack, and Accelerators in a single resource and part of a single download.

PowerShell to check what BizTalk Server 2013 Cumulative Updates are installed in your Servers with PowerShell: This is a simple script that allows you to configure the template name of the cumulative updates, that will change from version to version, and will give you the list of all BizTalk Server 2013 cumulative updates installed on your machine:

This is the list of BizTalk Server 2013 Cumulative Update installed in this machine: BTS2013LAB01 
- Microsoft BizTalk Server 2013 CU1 
- Microsoft BizTalk Server 2013 CU2 
 
This is the list of BizTalk Server 2013 Adapter Pack Cumulative Update installed in this machine: BTS2013LAB01 
- BizTalk Adapter Pack 2013 CU1

The sample script (the link to the full script is available at the end of this post):

#Name template for BizTalk Server CU's for BizTalk Server 2013 (normally they are "Microsoft BizTalk Server 2013 CU#") 
$CUNameTemplate = 'Microsoft BizTalk Server 2013 CU' 
 
#The Wow6432 registry entry indicates that you're running a 64-bit version of Windows. 
#It will use this key for 32-bit applications that run on a 64-bit version of Windows. 
$keyResults = Get-ChildItem -path HKLM:SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match $CUNameTemplate} 
 
if($keyResults.Count -gt 0) 
{ 
 write-host "This is the list of BizTalk Server 2013 Cumulative Update installed in this machine: $env:computername"
} 
else
{ 
 write-host "There is the no BizTalk Server 2013 Cumulative Update installed in this machine: $env:computername"
} 
 
foreach($keyItem in $keyResults) 
{ 
 if ($keyItem.GetValue("DisplayName") -like "*$CUNameTemplate*") 
 { 
 write-host "-" $keyItem.GetValue("DisplayName").ToString().Substring(0,$keyItem.GetValue("DisplayName").ToString().IndexOf(" CU")+4) 
 } 
} 
 
... 
 
#Name template for BizTalk Server Adapter Pack CU's for BizTalk Server 2013 (normally they are "BizTalk Adapter Pack 2013 CU#") 
$CUNameTemplate = 'BizTalk Adapter Pack 2013 CU' 
 
#The Wow6432 registry entry indicates that you're running a 64-bit version of Windows. 
#It will use this key for 32-bit applications that run on a 64-bit version of Windows. 
$keyResults = Get-ChildItem -path HKLM:SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match $CUNameTemplate} 
 
...

THIS SQL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

Check all BizTalk 2013 Cumulative Updates installed in server with PowerShell (3 KB)
Microsoft | TechNet Gallery

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.