How to Check/Get the list of all BizTalk Cumulative Updates installed in the machine with PowerShell

Posted: August 25, 2016 in BizTalk, PowerShell
Tags: , , , , , , , ,

We cannot rely on documentation, if they exist, to be accurate, special regarding to the status of the machines present in the environment – I never found this kind of document that tell me what is installed on the machine, what are the updates (or CU) or service pack installed and so on… and regarding to BizTalk Server I do not remember another simple task like this, get or check the list of all BizTalk Cumulative Updates installed in your machine/environment, being so painful to perform!

Of course, there are some ways to check that, for example:

  • you can do it manually by checking “Control Panel\Programs\Programs and Features” and then view the “Installed Updates”, however, this can be a very annoying task and sometimes time consuming just to try find them in that huge list because they are not organized in a category BizTalk

BizTalk-CU1-In-RosettaNet-Category

BizTalk-CU2-and-3-In-UDDI-Category

  • you can use BizTalk MsgBoxViewer but still if you only want to check what CU are installed, or you need to analyze your entire system with this tool, or you need to uncheck all the select default queries and check only for the cumulative updates – which can also be an annoying and time consuming task

Check-BizTalk-CU-with-MsgBoxViewer

Check-BizTalk-CU-with-MsgBoxViewer-result

Probably there are other ways, nevertheless, I just want a quick and very easy way, because this is a basic and very simple task, to know what are the BizTalk Cumulative Updates installed likeConfused smile

This is the list of BizTalk Cumulative Update installed in this machine: BTS2013R2LAB01
- Microsoft BizTalk Server 2013 R2 CU1
- Microsoft BizTalk Server 2013 R2 CU2
- Microsoft BizTalk Server 2013 R2 CU3

This way I know that I need to install the last CU available: “Microsoft BizTalk Server 2013 R2 CU4”. Yehhh!

PowerShell script overview

So how can we easily automate tasks? and reuse them whenever necessary and at the same time 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 in automating repetitive tasks or tasks that are time consuming to perform manually.

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 cumulative updates installed in your machine:

$keyResults = Get-ChildItem -path HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match $CUNameTemplate}

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)
    }
}

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

After install the CU4 in my machine the result was what I was expecting:

This is the list of BizTalk Cumulative Update installed in this machine: BTS2013R2LAB01
- Microsoft BizTalk Server 2013 R2 CU1
- Microsoft BizTalk Server 2013 R2 CU2
- Microsoft BizTalk Server 2013 R2 CU3
- Microsoft BizTalk Server 2013 R2 CU4

You can download the PowerShell Script used here from:

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

Comments
  1. […] See his blog How to Check/Get the list of all BizTalk Cumulative Updates installed in the machine with PowerShell… […]

  2. […] wrote in my personal blog a blog post about how can you archive this same task in BizTalk Server 2013 R2. In BizTalk Server 2013 R2, […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s