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:
  • Hosts
  • Host instances
  • Adapters
  • Adapter receive handlers
  • Adapter send handlers
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

  • hostname - Name of the hosts
  • ntgroupname - User group associated with this host
  • isdefault - is it the default host? (true/false)
  • hosttracking - is it a tracking host? (true/false)
  • authtrusted - trusted host (true/false)
  • hosttype - type of host (1 - In-Process, 0 - Isolated)
  • ishost32bitonly - is it a 32-bit only host (true/false)

Host instances

  • servername - name of the server
  • hostname - name of the host
  • username - account under which instance will run (can be left blank if default is specified)
  • password - password for the account (can be left blank if default is specified)
  • startinstance - should the instance be started automatically (true/false)

Adapters

  • name - name of adapter
  • type - type description
  • comment - any comments about the adapter

Receive handler

  • hostname - host name that wil service this handler

Send handler

  • hostname - host name that wil service this 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.

Last edited Mar 30, 2016 at 5:28 AM by RudolfHenning, version 11