Project Description
BizTalk tool to automate the configuration of hosts, hosts instances, adapters and adapter handlers. This helps to configure the BizTalk environment quickly without all the manual steps usually needed. Also great to set up multiple environments with the same settings.

Purpose

When managing multiple BizTalk environments it is often a headache to keep them in sync. This tool was created to automate the set up of a BizTalk environment after the initial install and configuration (the normal configuration wizard provided by Microsoft). This way you can ensure that development and testing environments are the same as the production environment.

BizTalk version support

This tool has been tested against BizTalk 2006, 2006R2, 2009 and even 2010! It hasn't been tested yet but in theory it should work on 2013 as well.

How does it work

The tool makes use of WMI to create or remove objects in the BizTalk group. It must run locally on one of the servers of the BizTalk group in question. It takes an XML file as input that specifies how the environment must be configured. For host instances you can specify the account and password the service must run under or alternatively you can specify a default user name and password as parameters when running the utility. It can configure the following things: For each type of object you can specify whether to add or remove it. It process the XML configuration file by Hosts first, then Host instances and then Adapters with their send and receive handlers.

Configuration file

Inside the XML configuration file you can specify most (if not all) of the settings needed to configure objects in BizTalk.
The following attributes can be used:

Hosts

Host instances

Adapters

Receive handler

Send handler

XML configuration example

The following is a sample configuration file:
<BtsAdminConfiguration>
  <Hosts>
    <Host hostname="NewHostName" ntgroupname="BizTalk Application Users" isdefault="false" hosttracking="false" 
         authtrusted="false" hosttype="1" ishost32bitonly="True"/>
  </Hosts>
  <HostInstances>
    <HostInstance servername="." hostname="NewHostName" username="" password="" startinstance="true"/>
    </HostInstances>
  <Adapters>
    <Adapter name="FILE" type="FILE" comment="FILE adapter">
      <ReceiveHandler hostname="NewHostName"/>
      <SendHandler hostname="NewHostName"/>
    </Adapter>
  </Adapters>
</BtsAdminConfiguration>

Command line parameters

The tool takes the following parameters:
BiztalkConfigLoader.exe [config file] [-r] [-u:username] [-p:password]
where
config file : BizTalk XML configuration. Default BtsAdminConfiguration.xml
-r : Remove previous settings first
-u: : Default username used to run host instances
-p: : default password used to run host instances

Credit

This tool is based on a sample application created by 'romiko'. I made some changes to customize it for my own purposes enhancing it as I went along.