Build a Multi-Server, Configured, BizTalk 2013 R2 Domain in Windows Azure IaaS in less than 1 hour!

Build a Multi-Server, Configured, BizTalk 2013 R2 Domain in Windows Azure IaaS in less than 1 hour!

A little over 2 years ago I released a set of PowerShell scripts for auto creating a full Multi-Server BizTalk 2013 Domain inside Azure IaaS.  I spent 100’s of hours on these scripts to get them working correctly.  You can view my session at TechEd 2013 US online for more details.

I have made updates to these scripts and updated them to support BizTalk 2013 R2 and SQL 2014.  These scripts will automatically created a clean isolated 2 BizTalk Server 2013 R2 Domain using SQL 2014.  All domain user accounts are auto created.  BizTalk group and host settings are created.  The only manual intervention that is needed is to log into each server and run a PowerShell script.  In less than an hour you can have a fully configured BizTalk 2013 R2 Domain!  And since it is scripted, you can create a clean environment from scratch anytime you need one.

Note: Running these scripts will created Virtual Machines inside Windows Azure.  You will be charged for the Virtual Machines.  Make sure you understand the costs before running these scripts.

Why not use an Azure Resource Manger Template for this?  Great question!  I tried.  I spent about 40 hours trying to port these scripts into an Azure Resource Manger Template with no success.  I was unable to get the BizTalk and SQL Servers to join the domain.  Azure Resource Manger PowerShell has a new set of commands that I could of used, but they are in the process of changing – so for now keeping the scripts as-is seemed the best course of action.

You can review and download the updated scripts on MSDN – Automatic Multi-Server BizTalk 2013 R2 Domain Creation PowerShell Scripts for Azure IaaS.  If you like the scripts please rate them with a 5-star.

To run the scripts inside Visual Studio 2013 / 2015 do the following:

  1. Download them from MSDN – they are inside a Visual Studio 2013 Solution
  2. Open Visual Studio as an Administrator and open the Solution
  3. Update 3 values inside variables.ps1  It is the top 3 variables in the file.
  4. Update the top variable inside MAIN_MASTER.ps1 It is the first variable in the script.
  5. Right-click on MAIN_MASTER.ps1 and select "Execute As Script".  Wait about 45 minutes. 
  6. Log into BizTalk 02, open C:\BizTalk_Provisioning\ReadMe.docx.  Follow the instructions.  Do not close the Remote Desktop session.  The PowerShell window will open and close right away.  See details below.
  7. Log into BizTalk 01, open C:\BizTalk_Provisioning\ReadMe.docx.  Follow the instructions.  Wait about 10 minutes. Note that you have to run the last command twice.  See details below.

To run the scripts through PowerShell IDE dot he following:

  1. Download them from MSDN – they are inside a Visual Studio 2013 Solution
  2. Open Main_Master.ps1 and variables.ps1 inside PowerShell IDE, make sure to open PowerShell IDE as an Administrator
  3. Update 3 values inside variables.ps1
  4. Update the top variable inside MAIN_MASTER.ps1
  5. Run MAIN_Master.ps1 as an Administrator
  6. Once complete, Log into BizTalk 02, open C:\BizTalk_Provisioning\ReadMe.docx.  Follow the instructions.  Do not close the Remote Desktop session.  The PowerShell window will open and close right away.   See details below.
  7. Log into BizTalk 01, open C:\BizTalk_Provisioning\ReadMe.docx.  Follow the instructions.  Wait about 10 minutes. Note that you have to run the last command twice.  See details below.

This download contains the following scripts:

  • MAIN_Master.ps1 – This is the main scripts that calls all the other scripts that do all the work.
  • MAIN_RemoveVM.ps1 – This script will remove and delete everything created inside the domain.
  • MAIN_SaveMoney_StopAll.ps1 – This script to turn off all the VM’s in the domain.  You need to update 1 value in this file to run it.
  • MAIN_SpendMoney_StartAll.ps1 – This script to turn on all the VM’s in the domain.  You need to update 1 value in this file to run it.
  • variables.ps1 – Core variable file, you need to update 3 values in here.
  • Various other helper scripts and files

Detailed Post Script Configuration Steps (this is outlined in the ReadMe.docx downloaded to each server)

On BizTalk 02:

  1. Once the PowerShell scripts are complete log into the BizTalk 02 server with the domain admin account.
  2. Open a PowerShell windows as Administrator.

  3. Change directories as follows “cd c:\BizTalk_Provisioning”
  4. Run the following command “MicrosoftCloudProvisioningLocalService.exe” – you should see this running as a service.

  5. Leave the Remote Desktop Session open and go to the BizTalk 01 Server.

On BizTalk 01:

  1. Once the PowerShell scripts are complete and the service is started on BizTalk 02, log into the BizTalk 01 server with the domain admin account.
  2. Open two PowerShell windows as Administrator.

  3. In the first window, change directories as follows “cd c:\BizTalk_Provisioning”
  4. Run the following command “MicrosoftCloudProvisioningLocalService.exe” – you should see this running as a service.

  5. In the second window, change directories as follows “cd c:\BizTalk_Provisioning”
  6. Run the following command “.\Microsoft.Cloud.Provisioning.Client.exe .\multinodeconfigDemo.xml” – you should see several pop-up windows.  This should fail.

  7. Run the following command again “.\Microsoft.Cloud.Provisioning.Client.exe .\multinodeconfigDemo.xml” – you should see several pop-up windows again but this time it should Complete.

  8. The end result is a fully configured, multi-server BizTalk Domain inside Windows Azure!

Make sure you use the provided scripts to start, stop, and remove the artifacts created.  I look forward to your feedback!