Have you ever needed to export some or all of your BizTalk applications? More than once, I have had to audit what's deployed in production with what is in the version control. The audit starts with extracting what is deployed.

I have written a simple PowerShell script that can export your BizTalk applications. The assumptions are:

  • The script is executed with elevated privileges
  • The script is executed on a BizTalk application server
  • BizTalk is configured
  • I tested the script using PowerShell 4.0 and 5.0. It will probably work with PowerShell 3.0.
The script can be found at GitHub. The script is written as a standalone script. You can pass on variables at the prompt such as:
  • server -- the SQL message box; by default it will read registry
  • database -- name of Management DB in the message box; by default it will read registry
  • btshome -- installation folder of BizTalk
  • logdir -- this is where the script puts logs; by default it will use the TEMP system variable
  • logfile -- this is the name of one of the log files containing the names of the applications in the BizTalk group; by default it is app<sql server name>.txt. This file is temporary; it is deleted after the exports complete. Addition log files are created using <application name>.msi.log and <application name>.xml.log for the MSI and the Bindings file, respectively, for each exported application. 
  • msiDir -- where the MSI's are exported; by default it is a directory named after the server under the logdir
  • SearchApps -- this is used in filter application names using StartsWith function/filter. So if SearchApps is foo, applications with names starting with foo are exported, such as foobar.
Please note that the script does NOT try to export BizTalk.System application. That foundational application cannot be exported. 

Hope it works for you. I intend to add related scripts, such as one that can expand the MSI, after they have been exported.