How to obtain a list of “BizTalk Software Inventory” installed with PowerShell

Posted: May 14, 2012 in BizTalk, PowerShell
Tags: ,

Just play around with PowerShell and some BizTalk administrative and maintenance tasks…

It’s always good to know what software is installed in our environment. Sometimes we need to know what version of BizTalk is installed or what version of the Adapter Pack, x86 or x64?

And preferably be able to get this list in an easy and automated way.

This is my first version of this script and I will present how we can accomplish this using PowerShell:

$strComputer = "."
$arrVersions = "3.0.4902.0", "3.0.6070.0", "3.0.7405.0", "3.5.1602.0", "3.6.1404.0", "3.8.368.0", "3.9.469.0"
$location = get-location

$colItems = get-wmiobject -class "Win32_Product" -namespace "root\CIMV2" -computername $strComputer

foreach ($objItem in $colItems) {
   $Caption = $objItem.Caption

   if (($Caption -like "*BizTalk*") -and (($Caption -notlike "*BizTalk Server Setup*")))
   {
      write-host "Caption: " $objItem.Caption
      write-host "Description: " $objItem.Description
      write-host "Installation Date: " $objItem.InstallDate
      write-host "Installation Location: " $objItem.InstallLocation
      write-host "Name: " $objItem.Name
      write-host "Version: " $objItem.Version
      if( ($arrVersions -contains $objItem.Version) -like "True")
      {
         $bizTalkRegistryPath = "HKLM:\SOFTWARE\Microsoft\BizTalk Server"
         Set-Location $bizTalkRegistryPath
         $key = Get-ChildItem
         write-host "Product Edition: " $key.GetValue("ProductEdition")
         Set-Location $location
      }
      write-host "Vendor: " $objItem.Vendor
      write-host
   }
}

Result sample:

Caption: Microsoft BizTalk Server Best Practices Analyzer
Description: Microsoft BizTalk Server Best Practices Analyzer
Installation Date: 20110819
Installation Location: C:\Program Files (x86)\BizTalkBPA\
Name: Microsoft BizTalk Server Best Practices Analyzer
Version: 1.2.133.0
Vendor: Microsoft Corporation

Caption: Microsoft BizTalk Server 2010
Description: Microsoft BizTalk Server 2010
Installation Date: 20120229
Installation Location: C:\Program Files (x86)\Microsoft BizTalk Server 2010\
Name: Microsoft BizTalk Server 2010
Version: 3.9.469.0
Product Edition: Developer
Vendor: Microsoft Corporation

Caption: Microsoft BizTalk Adapter Pack
Description: Microsoft BizTalk Adapter Pack
Installation Date: 20120430
Installation Location: C:\Program Files (x86)\Microsoft BizTalk Adapter Pack\
Name: Microsoft BizTalk Adapter Pack
Version: 3.5.6527.0
Vendor: Microsoft Corporation

Caption: Microsoft BizTalk Adapter Pack(x64)
Description: Microsoft BizTalk Adapter Pack(x64)
Installation Date: 20120430
Installation Location: C:\Program Files\Microsoft BizTalk Adapter Pack(x64)\
Name: Microsoft BizTalk Adapter Pack(x64)
Version: 3.5.6527.0
Vendor: Microsoft Corporation

I hope you find it useful.

Obtain a list of “BizTalk Software Inventory” installed with PowerShell (1.1 KB)
Microsoft | TechNet Gallery

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