To finalize this series of posts about how to check what BizTalk Server <version> Cumulative Updates are installed in your Servers with PowerShell:
- How to check what BizTalk Server 2010 Cumulative Updates are installed in your Servers with PowerShell
- How to check what BizTalk Server 2016 Cumulative Updates are installed in your Servers with PowerShell
- How to Check what BizTalk Server 2013 R2 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 are still running in this version; for this reason, it is still a valid and quite useful script.
📝 One-Minute Brief
This post shows how to use a PowerShell script to quickly identify which BizTalk Server 2013 cumulative updates and adapter pack updates are installed on a server, helping administrators audit and maintain legacy environments more efficiently.
PowerShell script overview
So how can we easily automate tasks? and reuse them whenever necessary, while saving significant time for other tasks?
Using PowerShell is a good option. Windows PowerShell is a Windows command-line shell designed especially for system administrators and can be used by BizTalk administrators to help them automate repetitive tasks or tasks that are time-consuming to perform manually.
PowerShell to check what BizTalk Server 2013 Cumulative Updates are installed in your Servers with PowerShell
This script is very similar to the one I created for BizTalk Server 2010 because, in earlier versions, such as BizTalk Server 2010 and 2013, there were separate versions for BizTalk Server and the BizTalk Adapter Pack. This has changed since BizTalk Server 2013 R2, when Microsoft decided to create Cumulative Updates for BizTalk Server, Adapter Pack, and Accelerators in a single resource, part of a single download.
This is a simple script that allows you to configure the template name of the cumulative updates, which 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:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ -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:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match $CUNameTemplate}
...
Download
THIS POWERSHELL IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.
You can download Check all BizTalk 2013 Cumulative Updates installed in the server with PowerShell from GitHub here:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.
1 thought on “How to check what BizTalk Server 2013 Cumulative Updates are installed in your Servers with PowerShell”