Tuesday, June 11, 2013

PowerShell for BizTalk Administration: Is this thing on? Part 1

I've been heavily involved with BizTalk administration - making sure our environment is healthy and keeping pace with processing well over 1,000 messages/second (yes, that much and more).  This is all done between 40+ applications, which uses hundreds of recieve ports, send ports, orchestrations, host instances, etc.  Our BizTalk environment pulls this off without a sweat.

There are times, however, when we need a quick response to "is this thing on?"  I've found, like many others, that using WMI calls and the Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer class within Powershell is mighty, mighty powerful (and easy)!  Placing these calls into PowerShell scripts are a quick, convenient way to find those answers.

As a highlight, the initial tasks are to verify the status (i.e. running/started) of the following BizTalk artifacts:
  1. Receive Ports
  2. Send Ports
  3. Orchestrations
  4. Host Instances
You could certainly make a call to get Application status (running, partial, stopped), but you'll find quickly that the above list goes into greater detail.  There are many cases where a particular send port may have stopped, and we may want to know that sooner than later.

Furthermore, it would be nice to get a quick view of suspended messages.  Later on, we'll discuss how to validate other artifacts outside of BizTalk (i.e. IIS) which are closely hooked into BizTalk.

We'll get into the Ports in Part 2.