How to reset the built-in administrator account password from an Azure BizTalk VM.

How to reset the built-in administrator account password from an Azure BizTalk VM.

Are you careless like me who constantly forgets the credentials (not critical)? If so this post about how you can reset the built-in administrator account password on an Azure BizTalk VM will help you not to waste a few hours in vain.

I think that the life of a consultant is difficult regarding system credentials, you have your personal credentials (AD account, company and personal emails, and so on) and for each client, you may also have different credential accounts… If this were not already complicated, each system may have different criteria that require you to have more complicated or simpler passwords. For these cases, the solution is more or less simple, we annoy the sysadmin and ask him to reset our password. However, for our Azure VM that we create in our Azure Subscription for demos or production, well that can be a more complicated scenario and I have tendency to create and delete several BizTalk Server Developer Edition machines, special for POC, Workshops or courses and sometimes (aka all the time) I forgot the built-in administrator password. So, how can we reset the built-in administrator account password from an Azure BizTalk Server VM?

Note: I am referring Azure BizTalk Server VM, mainly because my blog is about Enterprise Integration but this can apply to any type of Azure VM.

Most of the time the answer is very simple:

  • You access the Azure portal (https://portal.azure.com/) and select the Virtual Machine that you want to reset the password
  • Then click Support + Troubleshooting > Reset password. The password reset blade is displayed:

Reset the built-in administrator account password: Azure Portal BizTalk VM

  • You just need to enter the new password, then click Update. And you will see a message on the right upper corner saying the reset password task is processing.

Reset the built-in administrator account password: Azure Portal BizTalk VM task begin

  • The result of the task will be presented in the Notification panel and most of the times you will find a “Successfully reset password” message

Reset the built-in administrator account password: Azure Portal BizTalk VM task complete

But there is always “an exception to the rule”, and that was one of my cases. When I was trying to reset the password through the Azure Portal I was always getting an Unable to reset the password message, don’t know exactly why to be honest. I tried to reset the password by using PowerShell described in the documentation: How to reset the Remote Desktop service or its login password in a Windows VM

Set-AzureRmVMAccessExtension -ResourceGroupName "myResoureGroup" -VMName "myVM" -Name "myVMAccess" -Location WestUS -typeHandlerVersion "2.0" -ForceRerun

But still I was not able to perform this operation and I was getting this annoying error:

…Multiple VMExtensions per handler not supported for OS type ‘Windows’. VMExtension. VMExtension ‘…’ with handler ‘Microsoft.Compute.VMAccessAgent’ already added or specified in input.”

Solution

To solve this problem, I was forced to remove the existing VMExtention by:

  • First by getting the list of extensions on VM to find the name of the existing extension (presented in red on the below picture)
Get-AzureRmVM -ResourceGroupName [RES_GRP_NAME] -VMName [VM_NAME] -Status

Reset the built-in administrator account password: Azure Portal BizTalk VM PowerShell Get-AzureRmVM

  • And then by removing the VMAccess extension from the virtual machine
Remove-AzureRmVMAccessExtension -ResourceGroupName [RES_GRP_NAME] -VMName [VM_NAME] -Name [EXT_NAME]
  • You will get a validation question. “This cmdlet will remove the specified virtual machine extension. Do you want to continue?”, Type “y” and then ENTER to accept and continue.

Reset the built-in administrator account password: Azure Portal BizTalk VM PowerShell Remove-AzureRmVMAccessExtension

After that you can access to the Azure portal (https://portal.azure.com/), select the Virtual Machine that you want to reset the password, click Support + Troubleshooting > Reset password and update the built-in administrator account password without the previous problem.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

BizTalk Server 2016 Developer edition is now available on Visual Studio Dev Essentials

With the recent release of BizTalk Server 2016 we are happy to announce that the developer image of BizTalk Server 2016 is licensed for free to use in your test and development scenarios. BizTalk Server 2016 is Microsoft’s latest release of the new hybrid integration software.

With BizTalk Server 2016, customers can automate mission critical business processes, leverage support for latest first party platforms and gain newer capabilities within the BizTalk Administration console. With this release, customers also have the flexibility to adopt a hybrid approach by choosing to connect to SaaS applications through Azure Logic Apps, or running BizTalk Server on Azure leveraging full support in production environments.

Azure Logic Apps is another core part of Microsoft’s Hybrid Integration Platform, that allows you to rapidly connect to numerous SaaS and enterprise applications, enable business to business communication and leverage the power of other Azure services like Functions, Cognitive Services, Machine Learning and many more. BizTalk Server 2016 is the first version to take full advantage of this hybrid integration story, with an out of the box adapter to connect directly to Azure Logic Apps. This opens up numerous hybrid and cloud integration scenarios – all from the comfort of using your on-premises BizTalk Server 2016.

BizTalk Server 2016 also provides support to many of the first party Microsoft platforms such as Windows Server 2016, Office 2016, Visual Studio 2015 and SQL Server 2016. In addition, it provides the ability to run your Enterprise Integration Solution in the cloud leveraging the AlwaysOn and Availability groups through SQL Server 2016 to achieve high available environments in Azure on IaaS.

Please follow this link to sign up for Visual Studio Dev Essentials and download BizTalk Server 2016 Developer edition for free today.

Microsoft IT’s Enterprise Integration Platform (EPS) team goes live on BizTalk Server 2016

Microsoft IT’s Enterprise Integration Platform (EPS) team became the first to go-live on BizTalk Server 2016. The platform that is managed by EPS is one of the most critical in the Microsoft ecosystem as it processes over 30 million B2B transactions per month worth in excess of USD 120 Billion annually with 2000 + partners using multiple message formats including X12, EDIFACT, XML, SWIFT spans across all business domains viz., Supply Chain, Finance, Human Resources, Volume Licensing. The initial functional & performance test results of BizTalk 2016 were so encouraging that the team implemented a “critical” trade screening business process that ensures screening of organizations, consumers before Microsoft sells its products and services.

This project is part of overarching initiative to optimize infrastructure costs by adopting Azure’s IaaS & PaaS offerings and completely eliminating on premise footprint. This is where BizTalk 2016 delivers key business value due to its compatibility with Azure IaaS while providing a supported High Availability solution. Yes, that’s right – unlike its predecessor, BizTalk Server 2016 leverages out-of-box SQL Server 2016’s “Always On Availability Group ” functionality to provide high availability solutions on Azure IaaS. This release also provides BizTalk connectors to support hybrid integration scenarios.

While the PaaS story of B2B integration matures with the rapid emergence of Logic Apps, Microsoft was fully focused on this new release of BizTalk Server as it allows existing customers to move to Microsoft supported BizTalk-IaaS solution without having to change existing BizTalk applications. To ensure a defect-free release of BizTalk 2016, Microsoft IT and BizTalk Product Group collaborated to identify top enterprise integration scenarios which need to be tested before general availability (GA) of BizTalk 2016 and be the first customer to adopt BizTalk 2016 on IaaS. To achieve this objective, rigorous testing and validation was performed along the following lines:

  • BizTalk functional testing on IaaS
    • All artefacts, including different adaptors and message types
    • End to end flows which include B2B and hybrid A2A scenarios using the new Logic Apps adaptor.
    • Individual Application data and sanity validation tests
  • High Availability tests
    • Change the backend SQL HA/DR architecture of the SQL WFSC cluster to SQL Always On Availability Group and potential implications/best practices to adhere to.
    • Extreme HA tests, including MSDTC edge case scenarios.
  • Performance & Load testing
    • Performance tests (sustenance, peak load behavior, etc.)
    • Reliability tests (peak load auto-recovery)
    • Scalability tests (ability to handle up to 5X the normal traffic load patterns)

The migration from BizTalk Server 2013R2 was “lift and shift” or as is basis. Existing BizTalk applications from 2013R2 were used as is.

The experience overall with BizTalk Server 2016 on Microsoft Azure IaaS VMs has been exciting, especially with the new set of features including IaaS High-Availability support, Logic Apps adaptor, improved BizTalk Admin UI console and new features which have made administration easier than before. Additionally, due to the migration to IaaS, the team has been able to consolidate and optimize hardware requirement exactly as per use, thereby already showing up to 20% cost savings annually in the initial analysis.

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!

BizTalk and SQL Azure Publisher Name, Offer, and SKUs for Azure Resource Manager PowerShell Module

With the introduction of Azure Resource Manager (ARM) the world of Infrastructure as a Service (IaaS) inside Azure changed – for the better.

ARM introduced a new way to organize and deploy resources across various aspects of Windows Azure.  Now you can create configuration scripts for complex Azure scenarios that include storage, web apps, virtual machines, networks, SQL databases, and more.  

With these changes introduced the AzureResourceManager PowerShell module.  I could write many posts on this along, but not to get into to many details you now have two ways to do many things in Windows Azure using PowerShell.  This gets a little more complex considering additional breaking changes are coming soon when Switch-AzureMode is deprecated and the introduction of both traditional and classic versions of some Azure Artifacts like storage and virtual machines.   Going forward I would recommend using AzureResourceManager based PowerShell commands for all new scripts.

Never the less, the way to create a new Virtual Machine is a little more complex now using AzureResourceManager.  This is due to the greatly enhanced feature set in Azure that we just did not have a few years ago.  As part of these changes, you need to call out your base image disk differently than before.  Lets take a look at the two options.

Using Azure Service Manager (ASM – default module in PowerShell right now)

$imageWindows = ‘bd507d3a70934695bc2128e3e5a255ba__RightImage-Windows-2012-x64-v13.5’
$MyDC = New-AzureVMConfig -name $vmnamePDC -InstanceSize $sizePDC –ImageName $imageWindows

Using Azure Resource Manager (ARM- will be the new default)

$VirtualMachine = Set-AzureVMSourceImage -VM $VirtualMachine –PublisherName 2012-R2-Datacenter –Offer BizTalk-Server –Skus 2013-R2-Developer –Version "latest"

With Azure Service Manger you only need to supply the operating system image name and this can easily be found doing a single PowerShell query. 
With Azure Resource Manger you need to specify a Publisher Name, Offer, SKU, and Version of the Operating System Azure Image you want to use.  It is not as easy or straight forward to get these values.

Below I have put together a quick reference list related to BizTalk Server, SQL Server, and Windows as well as the PowerShell scripts to get these values for any other operating system image.

Publisher

Offer

SKU

MicrosoftBizTalkServer

BizTalk-Server

2013-Developer

MicrosoftBizTalkServer

BizTalk-Server

2013-Standard

MicrosoftBizTalkServer

BizTalk-Server

2013-Enterprise

MicrosoftBizTalkServer

BizTalk-Server

2013-R2-Developer

MicrosoftBizTalkServer

BizTalk-Server

2013-R2-Standard

MicrosoftBizTalkServer

BizTalk-Server

2013-R2-Enterprise

MicrosoftSQLServer

SQL2008R2SP3-WS2008R2SP1

Enterprise, Standard, Web

MicrosoftSQLServer

SQL2012SP2-WS2012

Enterprise, Standard, Web *

MicrosoftSQLServer

SQL2012SP2-WS2012R2

Enterprise, Standard, Web *

MicrosoftSQLServer

SQL2014-WS2012R2

Enterprise, Standard, Web *

MicrosoftSQLServer

SQL2014SP1-WS2012R2

Enterprise, Standard, Web *

MicrosoftSQLServer

SQL2016CTP2-WS2012R2

Enterprise

MicrosoftWindowsServer

WindowsServer

2008-R2-SP1

MicrosoftWindowsServer

WindowsServer

2012-Datacenter

MicrosoftWindowsServer

WindowsServer

2012-R2-Datacenter

MicrosoftWindowsServer

WindowsServer

2016-Technical-Preview-3-with-Containers

MicrosoftWindowsServer

WindowsServer

Windows-Server-Technical-Preview

* some of the SQL SKUs contain other types of optimized versions.

If you want to get the Publisher Name, Offer, and SKU for other Azure Images you can use these PowerShell commands.

# Gets all Publishers in a specific datacenter
$locName="West US"
Get-AzureVMImagePublisher -Location $locName | Select PublisherName | Select * | Out-Gridview -Passthru

# Gets all Offers for a given Publisher in one location
$locName="West US"
$pubName="MicrosoftWindowsServer"
Get-AzureVMImageOffer -Location $locName -Publisher $pubName | Select Offer | Select * | Out-Gridview -Passthru

# Gets all SKUS for a giving Offer for a given Publisher in one location
$locName="West US"
$pubName="MicrosoftWindowsServer"
$offerName="WindowsServer"
Get-AzureVMImageSku -Location $locName -Publisher $pubName -Offer $offerName | Select Skus

Enjoy.

Tweet, Comment, or Post Your Way to One of 12 Great Prizes!

Time is running out to enter my contest to win one of 12 great prizes!

To enter, simply take a look at my new PowerShell scripts located here:

  • Single Server Microsoft Azure BizTalk 2013 Developer Edition Setup Scripts
  • Domain Microsoft Azure BizTalk 2013 Enterprise Setup Scripts

Then Tweet, Comment, or Post your way to a prize! 

You do not need to run the scripts or do anything to enter!  Just leave a comment, tweet, or post to Facebook.

You can enter through each method below but only one prize per winner.  The $100 prize if for the best review of the PowerShell Scripts but the other 11 prizes will be selected at random.

1. Enter via Twitter – Tweet your comments / entry.  Ensure to include @StephenWThomas and the hash tag #msbts.  It’s that easy. 

2. Enter via Facebook – Like BizTalkGurus on Facebook if you don’t always.  Post a comment to our wall. 

3. Enter via a Comment on either Single Server or Domain PowerShell download pages above.  If you comment on both, only one will count.  Just post a comment to one of the links above.

The contest ends on June 30th at 11:59 PM CST.

Prizes

$100 cash brought to you by BizTalk360

5 30-day Pluralsight Subscriptions – $30 value.
You could use your subscription to watch my courses on “
What’s New in BizTalk Server 2013” or my new course “Into to BizTalk Server 2013 ESB Toolkit” that will be available soon.

6 “Getting Started with BizTalk Services 2013” eBooks – $15 value.

If you do not win the book, you can buy it at
Packt or at Amazon.
This is one of those books that every BizTalk Developer should own.

Good luck.

Build an Azure IaaS BizTalk Single Server or Domain – Win $100 or other Great Prizes

This is the biggest contest I have had in the 10+ years I have been blogging!  In all12 prizes to give away!

The top prize of $100 will be awarded to the person with the best feedback!  This could be good, bad, doesn’t matter just provide an honest review and assessment of the single server or domain setup scripts (forgive my poor PowerShell skills and spelling mistakes), BizTalk on IaaS, how you might use the scripts, or your Azure Virtual Machine experience in general.  A panel will review the comments and select the winner.  All decisions are final.  The other 11 prizes will be awarded at random. 

Call to Action – Get the Scripts:

  • Single Server Microsoft Azure BizTalk 2013 Developer Edition Setup Scripts
  • Domain Microsoft Azure BizTalk 2013 Enterprise Setup Scripts

Lets talk about what is at stake in this contest.  Top prize is $100 cash paid via PayPal in US funds sponsored by BizTalk 360.  If you live in a country that does not accept PayPal you can select another prize if you win.  Other prizes include 5 30-day unlimited memberships to Pluralsight and 6 eBooks of the new book “Getting Started with BizTalk Services 2013” sponsored by Packt Publishing. 

Prize

Sponsor
$100 cash

5 30-day Pluralsight Subscriptions – $30 value.

You could use your subscription to watch my courses on “What’s New in BizTalk Server 2013” or my new course “Into to BizTalk Server 2013 ESB Toolkit” that will be available soon.

6 “Getting Started with BizTalk Services 2013” eBooks – $15 value.

If you do not win the book, you can buy it at Packt or at Amazon.
This is one of those books that every BizTalk Developer should own.

 


Three ways to enter, enter all three ways to triple your changes to win one of the 11 random prizes!
 

Only one prize per winner.  In each case please comment on the new PowerShell scripts, BizTalk on IaaS, or Microsoft IaaS in general.  
The good, bad, did they work for you, did you look at then – if not why?  You do not even need to run the scripts or even download them if you do not want to.  Any comment is welcome but constructive feedback is appreciated over just a simple “they suck”.

1. Enter via Twitter – Tweet your comments about the PowerShell scripts, Ensure to include @StephenWThomas and the hash tag #msbts.  If you have too much to say, you can link to a post of your comment / review you have on a blog or on this site.  Or link to either the Single Server or Domain PowerShell scripts.  It’s that easy. 

2. Enter via Facebook – Like BizTalkGurus on Facebook if you don’t always.  Post to our wall about your experience with the PowerShell scripts.   Link to one of the download pages or to your own review / comments / blog. 

3. Enter via a Comment on either Single Server or Domain PowerShell download pages above.  If you comment on both, only one will count.  If you post a comment without being logged in, ensure we have a way to contact you if you win.

The contest is open now through Monday June 30st at 11:59 PM CST.  Winners will be announced around Thursday July 3rd.  

Good luck!

End to End BizTalk Domain Setup in Windows Azure IaaS Scripts

Got a little over an hour?  Get a full featured multi-server BizTalk 2013 domain running in Windows Azure IaaS!  It is fully configured with Send, Receive, Processing, and Tracking hosts all ready to go.  Since it is scripted, it is repeatable so you can tear it down when you are done and create a brand new fresh environment the next time! 

Cost: For a MSDN user the cost is around $0.55 per hour for the compute time with Medium VMs!  Monthly charges may be incurred for storage, bandwidth, and transaction but in my experience these have be next to nothing.  The costs for non-MSDN users will be significantly higher as these are premium images in Azure.

As promised at the BizTalk Summit in London in March, here are the Windows Azure IaaS Full BizTalk Domain Setup scripts.  Of course these scripts can be used to create any type of domain, not just for BizTalk. And better yet, you only need to update as little as 2 variables file to be able to run them!

Download scripts: Microsoft Azure IaaS BizTalk Domain Setup PowerShell Scripts

Important Points to Note

1. These scripts use Premium IaaS Images.  If you are not using a subscription tied to a MSDN account you will occur significant changes.

2. Due to legal issues related to the Microsoft provided BizTalk Provisioning Tool, I am unable to allow people to download it.  The BizTalk 2013 Images on IaaS contain an older, none working version.  Because of this some additional manual steps are required to complete the auto BizTalk configuration.  I have made the auto configuration an optional step that is enabled by a Flag in the variables file.  The default is false.  I suggest everyone spend 20 minutes to get the files from a developer image using the instructions below until we have an updated IaaS image that includes the files or until we are able to download them from Microsoft.  See below information on “To enable full end to end auto configuration do the following (Note – must be a MSDN users)”

This is what the scripts do:

  • Creates a Virtual Network, Affinity Group, and Azure Storage account
  • Create a Domain Controller with the BizTalk Groups and Users created
  • Creates a SQL Server and assigns the correct permissions for the BizTalk users
  • Creates two BizTalk Servers
  • Optional – Downloads a bunch of helper files to configure the BizTalk Group
  • Optional – Installs Classic Shell (yes, I can not live without a Start button)
  • Optional – Installs BizTalk 2013 CU2
  • Downloads Remote Desktop connections to the newly created VMs

To run the scripts:

  • Review the prerequisites below.
  • Open variables.ps1 and review the variables.  Only the top 8 should need to be looked at or updated.  Of these, only 2 values must be changed.
    • $baseVMName = ‘<abcd1234>’                                 # UPDATE – Must be Globally Unique and 8 characters or less.
    • $subscriptionName = ‘<subscription name>’              # UPDATE – This is the name of your subscription from the publishing file
    • $setupDir = "C:\BizTalkGurus"                                   # OPTIONAL UPDATE – Used for files on the remote and local servers
    • $basePathToScripts = ‘<path to scripts>’                    # OPTIONAL UPDATE – This is used if you run the scripts through an IDE
    • $workStorgeAccount = ’<update for auto configure>’    # OPTIONAL UPDATE – Update with the storage location of the helper files for auto configuration
    • $installCU2 = ‘false’                          #OPTIONAL UPDATE – Must upload BizTalk CU2 exe to the root of the Storage Account above
    • $installClassicShell = ‘false’              #OPTIONAL UPDATE – Must upload classic shell version 4.1 exe to the root of the Storage Account above
    • $installBizTalkProv = ‘false’               #OPTIONAL UPDATE – Must upload 5 files from BizTalk 2013 Dev box to the root of the Storage Account above
  • Run Master.ps1 in an elevated PowerShell window.  If running in an IDE it is best to run the script from the command windows rather than hitting Run. 

The end result will look something like this:

What is included

Prerequisites

  • Tested with PowerShell late- May release.  PowerShell versions before March (sorry can’t keep the versions straight) will fail in the VM creation because static IP Addresses are assigned to the VM’s in the network. 
  • Ensure you have a working PowerShell installation before running.  This can be tested by running Get-AzureLocation to ensure it returns values.  Details on how to set this up can be found here.
  • Scripts must be ran elevated. 

Main PowerShell Scripts

  • Master.ps1 – This is the only file you need to run.  Ensure you run from an elevated PowerShell window.  Takes a bit over an hour for full configuration.
  • variables.ps1  – This is the only file you need to update.  You should only need to look at the first 8 parameters. 
  • 00_Create_Network.ps1 – This script creates the affinity group, storage account, and virtual network.
  • 01_Create_PDC.ps1 – This script create the domain controller by promoting a windows server using remote PowerShell. It also creates all the groups and uses needed for the BizTalk configuration.
  • 02_Create_Servers.ps1 – This script creates the SQL and BizTalk Servers using the Enterprise Edition of the Microsoft provided images. 
  • 03_Configure_Servers_RemoteProp.ps1 – This script uses remote PowerShell to complete additional configuration on the SQL and BizTalk Servers.  If flags are set, files will be downloaded to the servers to complete configuration.
  • 04_Configure_Servers_LaunchRDP.ps1 – This script will launch the Remote Desktop sessions needed to complete the auto configuration.
  • 05_RemoteDesktop – Downloads the remote desktop connect for each server.  This is stored inside a new folder called RemoteDesktop in the scripts folder.
  • 99_RemoveVM.ps1 – End-to-end clean up script.  Removes all items created based on the variables file.  Note – due to limitations in Virtual Networks only run this if you have no other virtual networks on your subscriptions.   If you do, you should comment out the virtual network section of this script.
  • SaveMoney_StopAll.ps1 – Scripts to stop and deallocate all the Azure Virtual Machines based on the values in your variables file.
  • SpendMoney_StartAll.ps1 – Scripts to start all the Azure Virtual Machines based on the values in your variables file.
  • Configs folder – NetworkConfig.xml – This is the XML Configuration used to create the virtual network in Azure.
  • Helper Files – Helper files are only needed if you plan to auto-configure BizTalk, auto install CU2, or auto install Classic Shell
    • multinodeconfigDemo_DomainHosts.xml – XML file used by the BizTalk Provisioning tool to auto configure the BizTalk group.  No changes are needed to this file.
    • rdp.exe – Use to auto launch a Remote Desktop session to complete the BizTalk configuration. 
    • RunBizTalkTask_Domain.xml – File used to create a Windows Scheduled Task.
    • RunLocalClient.ps1 – PowerShell script to be ran locally on the First BizTalk Server in the group. 
    • RunLocalClientServer2.ps1 – PowerShell script to be ran locally on all Other BizTalk Server in the group. 
    • StartPowershell.exe – Helper exe to enable Windows Scheduled Task to easily run a PowerShell script in elevated mode.
    • Optional – ClassicShellSetup_4_1.exe – You need to be download from http://www.classicshell.net/ and uploaded to your container.   Ensure the version names match what is in the 03_Configure_Servers_RemoteProp.ps1 file.
    • Optional – BizTalk 2013 CU2 – This needs to be downloaded yourself and uploaded to your own public Azure container.
    • Optional – BizTalk.Provisioning.files- This needs to do downloaded yourself and uploaded to your own public Azure container.

To enable full end to end auto configuration do the following (Note – must be a MSDN users):

  • Put all helper files on your own public Azure storage account container
  • Update $workStorgeAccount in the variables file to the full address of your storage container
  • To enable auto install BizTalk 2013 CU2
    • Download BizTalk 2013 CU2 exe and upload it the root of your storage account
    • Update $installCU2 in the variables file to “true”
  • To enable auto BizTalk configuration
    • Create a BizTalk 2013 Development Virtual Machine in Microsoft Azure (script here)
    • Copy the 5 files in the C:\BizTalk_Provisiong folder
    • Upload the 5 files to the root of your storage account

If you do the auto configuration (witch is highly recommended for anyone who plans to run the scripts more than once) your end result will look like this.

Known Issues and Limitations:

  • At present the auto configuration is only possible if you download and host the BizTalk Provisioning files yourself.  This will change in the future and I will release a new set of scripts once the process is cleaner.
  • Every once in a while Azure is really slow.  I have added some speed breaks in the scripts to better account for this.
  • Every once in a while the auto configuration fails.  The servers get joined to the group by no hosts are created.  At that point, they should just be created manually or remove and restart all the scripts from scratch.
  • If you have an existing virtual network associated with your subscription the 99_RemoveVM script will delete it or fail trying.  This is a limitation in PowerShell. 

These scripts are over a year in the making!  Ok, ok, do not laugh.  I did not spend a year straight on them but I have spent over 300 hours trying to get them fully working end to end.  I have create no less than 100 domains while testing.  I never have an issue with the IasS side of things until the most recent release of PowerShell so things seem to be a little unstable at the moment,  All the issue I have ran into have been related to setting up the auto configuration.

Enjoy and I look forward to community feedback!

Microsoft Azure IaaS Full BizTalk Domain Setup PowerShell Scripts

Microsoft Azure IaaS Full BizTalk Domain Setup PowerShell Scripts

Download this sample using the download button below.

Change Log

1.0 (06/02/2014) – Initial release.
1.1 (06/10/2014) – Better VNet support, added per VM size configuration, auto log off when configuration is complete, added note that base VM name must be all lower case.

 

Important Points to Note

1. These scripts use Premium IaaS Images.  If you are not using a subscription tied to a MSDN account you will occur significant changes.

2. Due to legal issues related to the Microsoft provided BizTalk Provisioning Tool, I am unable to allow people to download it.  The BizTalk 2013 Images on IaaS contain an older, none working version.  Because of this some additional manual steps are required to complete the auto BizTalk configuration.  I have made the auto configuration an optional step that is enabled by a Flag in the variables file.  The default is false.  I suggest everyone spend 20 minutes to get the files from a developer image using the instructions below until we have an updated IaaS image that includes the files or until we are able to download them from Microsoft.  See below information on “To enable full end to end auto configuration do the following (Note – must be a MSDN users)”

3. The $baseVMName variable must be 8 characters or less and all lower case.

4. If the scripts fails, ensure you run 99_RemoteAll before re-running the scripts. 

5.  Due to limitations with PowerShell’s support for Virtual Networks, the 99_RemoteAll script will remove all Virtual Networks that do not have resources attached to them.  Ensure this is what you want before you run the script.  If you have existing Virtual Networks in use, the 99_RemoveAll script will fail on the removal step and the Virtual Network will need to be removed manually.


This is what the scripts do:

  • Creates a Virtual Network, Affinity Group, and Azure Storage account
  • Create a Domain Controller with the BizTalk Groups and Users created
  • Creates a SQL Server and assigns the correct permissions for the BizTalk users
  • Creates two BizTalk Servers
  • Optional – Downloads a bunch of helper files to configure the BizTalk Group
  • Optional – Installs Classic Shell (yes, I can not live without a Start button)
  • Optional – Installs BizTalk 2013 CU2
  • Downloads Remote Desktop connections to the newly created VMs

 

To run the scripts:

  • Review the prerequisites below.
  • Open variables.ps1 and review the variables.  Only the top 8 should need to be looked at or updated.  Of these, only 2 values must be changed.
    • $baseVMName = ‘<abcd1234>’                                 # UPDATE – Must be Globally Unique and 8 characters or less.  All lower case.
    • $subscriptionName = ‘<subscription name>’              # UPDATE – This is the name of your subscription from the publishing file
    • $setupDir = “C:\BizTalkGurus”                                   # OPTIONAL UPDATE – Used for files on the remote and local servers
    • $basePathToScripts = ‘<path to scripts>’                    # OPTIONAL UPDATE – This is used if you run the scripts through an IDE
    • $workStorgeAccount = ‘<update for auto configure>’    # OPTIONAL UPDATE – Update with the storage location of the helper files for auto configuration
    • $installCU2 = ‘false’                          #OPTIONAL UPDATE – Must upload BizTalk CU2 exe to the root of the Storage Account above
    • $installClassicShell = ‘false’              #OPTIONAL UPDATE – Must upload classic shell version 4.1 exe to the root of the Storage Account above
    • $installBizTalkProv = ‘false’               #OPTIONAL UPDATE – Must upload 5 files from BizTalk 2013 Dev box to the root of the Storage Account above
  • Run Master.ps1 in an elevated PowerShell window.  If running in an IDE it is best to run the script from the command windows rather than hitting Run. 

The end result will look something like this:


What is included

Prerequisites

  • Tested with PowerShell late- May release.  PowerShell versions before March (sorry can’t keep the versions straight) will fail in the VM creation because static IP Addresses are assigned to the VM’s in the network. 
  • Ensure you have a working PowerShell installation before running.  This can be tested by running Get-AzureLocation to ensure it returns values.  Details on how to set this up can be found here.
  • Scripts must be ran elevated. 

Main PowerShell Scripts

  • Master.ps1 – This is the only file you need to run.  Ensure you run from an elevated PowerShell window.  Takes a bit over an hour for full configuration.
  • variables.ps1  – This is the only file you need to update.  You should only need to look at the first 8 parameters. 
  • 00_Create_Network.ps1 – This script creates the affinity group, storage account, and virtual network.
  • 01_Create_PDC.ps1 – This script create the domain controller by promoting a windows server using remote PowerShell. It also creates all the groups and uses needed for the BizTalk configuration.
  • 02_Create_Servers.ps1 – This script creates the SQL and BizTalk Servers using the Enterprise Edition of the Microsoft provided images. 
  • 03_Configure_Servers_RemoteProp.ps1 – This script uses remote PowerShell to complete additional configuration on the SQL and BizTalk Servers.  If flags are set, files will be downloaded to the servers to complete configuration.
  • 04_Configure_Servers_LaunchRDP.ps1 – This script will launch the Remote Desktop sessions needed to complete the auto configuration.
  • 05_RemoteDesktop – Downloads the remote desktop connect for each server.  This is stored inside a new folder called RemoteDesktop in the scripts folder.
  • 99_RemoveVM.ps1 – End-to-end clean up script.  Removes all items created based on the variables file.  Note – due to limitations in Virtual Networks only run this if you have no other virtual networks on your subscriptions.   If you do, you should comment out the virtual network section of this script.
  • SaveMoney_StopAll.ps1 – Scripts to stop and deallocate all the Azure Virtual Machines based on the values in your variables file.
  • SpendMoney_StartAll.ps1 – Scripts to start all the Azure Virtual Machines based on the values in your variables file.
  • Configs folder – NetworkConfig.xml – This is the XML Configuration used to create the virtual network in Azure.
  • Helper Files – Helper files are only needed if you plan to auto-configure BizTalk, auto install CU2, or auto install Classic Shell

    • multinodeconfigDemo_DomainHosts.xml – XML file used by the BizTalk Provisioning tool to auto configure the BizTalk group.  No changes are needed to this file.
    • rdp.exe – Use to auto launch a Remote Desktop session to complete the BizTalk configuration. 
    • RunBizTalkTask_Domain.xml – File used to create a Windows Scheduled Task.
    • RunLocalClient.ps1 – PowerShell script to be ran locally on the First BizTalk Server in the group. 
    • RunLocalClientServer2.ps1 – PowerShell script to be ran locally on all Other BizTalk Server in the group. 
    • StartPowershell.exe – Helper exe to enable Windows Scheduled Task to easily run a PowerShell script in elevated mode.
    • Optional – ClassicShellSetup_4_1.exe – You need to be download from http://www.classicshell.net/ and uploaded to your container.   Ensure the version names match what is in the 03_Configure_Servers_RemoteProp.ps1 file.
    • Optional – BizTalk 2013 CU2 – This needs to be downloaded yourself and uploaded to your own public Azure container.
    • Optional – BizTalk.Provisioning.files– This needs to do downloaded yourself and uploaded to your own public Azure container.


To enable full end to end auto configuration do the following (Note – must be a MSDN users):

  • Put all helper files on your own public Azure storage account container
  • Update $workStorgeAccount in the variables file to the full address of your storage container
  • To enable auto install BizTalk 2013 CU2

    • Download BizTalk 2013 CU2 exe and upload it the root of your storage account
    • Update $installCU2 in the variables file to “true”
  • To enable auto BizTalk configuration

    • Create a BizTalk 2013 Development Virtual Machine in Microsoft Azure (script here)
    • Copy the 5 files in the C:\BizTalk_Provisiong folder
    • Upload the 5 files to the root of your storage account


If you do the auto configuration (witch is highly recommended for anyone who plans to run the scripts more than once) your end result will look like this.

 

Known Issues and Limitations:

  • At present the auto configuration is only possible if you download and host the BizTalk Provisioning files yourself.  This will change in the future and I will release a new set of scripts once the process is cleaner.
  • Every once in a while Azure is really slow.  I have added some speed breaks in the scripts to better account for this.
  • Every once in a while the auto configuration fails.  The servers get joined to the group by no hosts are created.  At that point, they should just be created manually or remove and restart all the scripts from scratch.
  • If you have an existing virtual network associated with your subscription the 99_RemoveVM script will delete it or fail trying.  This is a limitation in PowerShell. 

 

Enjoy and I look forward to community feedback!

%ufeff
Windows Azure Virtual Machines – Stopped doesn’t equal Stopped Deallocated

Windows Azure Virtual Machines – Stopped doesn’t equal Stopped Deallocated

When driving down the street I think we all know what to do when we see a Stop Sign – we know we need to stop the car. 

What happens when you see Stopped as a status for a Windows Azure Virtual Machines?

A little over a month ago Microsoft announced they would no longer charge for a Stopped Virtual Machine.  This came as welcome news as I am sure many of you are like me – have left something on for a few days and received a bill for it. 

What Microsoft introduced was really a new definition of Stopped to go along with the existing process they had in place.

We now have the following two definitions:

  • Stopped
  • Stopped – Deallocated

When you create a Virtual Machine inside Windows Azure you get a Cloud Service to basically host that virtual machine role.  You can add more than one Virtual Machine to that Cloud Service and would do so to achieve high availability. 

Up until a few days ago, that Cloud Service was always hidden from the Windows Azure Management Portal.  You could see it when you deleted the last virtual machine in the service or using PowerShell.  Now, you can see the services inside the UI – so that should help with the confusion.  The Cloud Service, along with other things, is what gives your Virtual Machine a Virtual IP address (VIP). 

In the pictures below you can see a few of my Virtual Machines and Cloud Services in the Stopped and Stopped Deallocated state. 

What’s the difference between Stopped and Stopped– Deallocated? 

Stopped $$$ – When a virtual machine is stopped you are still being charged for the virtual machine.  You also have the Virtual IP (VIP) address reserved and when you start the machine back up again you will get the same VIP.  This is useful when you must have the same VIP. 

Stopped Deallocated – When a virtual machine is stopped deallocated you are no longer charged for the virtual machine.  The catch is, when you start it back up you might not get the same VIP back again.  You get a message about this when you stop the Virtual Machine.

For all the work I am doing right now, the Stopped Deallocated state works just fine for me. 

See below on how to get your Virtual Machine into a Stopped or Stopped Deallocated state.

How to Stop a Virtual Machine ($$$)

  • PowerShell
    • Stop-AzureVM -Name $VirtualMachineName -ServiceName $ServiceName –StayProvisioned (StayProvisioned  is new in PowerShell as of 06/13)
  • Selecting Shut Down while logged into the Virtual Machine
  • REST API
    • Example: https://management.core.windows.net/<subscription-id>/services/hostedservices/swt003-sql01/deployments/swt003-sql01/roleInstances/swt003-sql01/Operations

How to Stop – Deallocate a Virtual Machine (Money Saver!!!!)

  • PowerShell
    • Stop-AzureVM -Name $VirtualMachineName -ServiceName $ServiceName –Force (Note if you don’t use –Force you get an annoying confirmation popup)
  • Using the Windows Azure Management Portal
    • You will get a confirmation informing you the Virtual IP will be released

Please post if I have missed any other ways to stop a Virtual Machine.

How are you using Windows Azure Virtual Machines?  Does the Stopped Deallocated state work for you?