Skip to the content.

BizTalk.Deployment PowerShell Module

Build Pipelines

Latest Release

Release Preview

Documentation

Overview

BizTalk.Deployment is an extensible PowerShell utility module based on a deployment framework featuring a declarative resource-driven task model and providing commands to deploy full-fledged Microsoft BizTalk Server® applications.

This module furthermore depends on the following third-party PowerShell Modules:

Rationale

Deploying a Microsoft BizTalk Server® application is often a complex and tedious task if one cannot comprehensively automate the process. Indeed there are generally much more going on than just deploying the Microsoft BizTalk Server® artifacts, it may be necessary to modify configuration files, to deploy Windows® services, to deploy custom databases or database objects, to register COM+ service components, etc.

Microsoft BizTalk Server® offers a Windows Installer-based approach to produce MSI deployment packages as a way to deploy custom applications. MSI packages are however generally hard to produce and even harder to customize, especially since the way packages are produced by Microsoft BizTalk Server® is undocumented. For these reasons, the approach offered natively by Microsoft BizTalk Server® falls short from meeting all our needs and expectations.

As a better alternative, one could entrust the deployment of Microsoft BizTalk Server® applications to BizTalk Deployment Framework, which, being built on top of MSBuild, is as extensible and customizable as MSBuild is. Thanks to its declarative and resource-driven task model, MSBuild is very appealing and quite easy to embrace. Customizing MSBuild however requires a dedicated skill set and, as such, is often a cumbersome and tedious process furthermore mixing different technologies —custom MSBuild tasks are generally written in C# while custom MSBuild targets are written in native XML-based MSBuild script. The operational semantics of MSBuild is also inherently quite complex and follows a multi-phase process. Custom item group definitions are moreover often very delicate to get right.

While willing to keep the declarative and resource-driven task model that MSBuild offers, BizTalk.Factory departs from it for extensibility and customization reasons and choses to rely on PowerShell instead. PowerShell has tremendous stories of achievements and customizations, as essentially, nothing on the Windows® platform is beyond the reach of PowerShell, be it native commands, WMI, or even .NET libraries. Writing custom tasks is therefore quite easy to achieve in and with PowerShell.

PowerShell even natively supports a declarative and resource-driven task execution model thanks to its Desired State Configuration service. However the granularity of the state that can be operated upon is too coarse —the whole computer— when one wants to individually un/deploy Microsoft BizTalk Server® applications. The user experience with DSC is moreover a little more involved than the usual REPL PowerShell experience that BizTalk.Factory wanted to keep because it is more easily amenable to automation via Azure pipelines.

Alternative to PowerShell DSC therefore had to be found; more specifically, ways to provide both a declarative resource specification —a la MSBuild’s ItemGroup or DSC’s DSCResource— and a declarative task execution engine —a la MSBuild’s Target or DSC’s resource methods. There are a few PowerShell modules that provide a declarative task execution engine —for instance psake and Invoke-Build— and BizTalk.Factory has chosen to rely on Invoke-Build. There are however no PowerShell module that provides a declarative resource specification, and BizTalk.Factory has chosen to build its own, Resource.Manifest.

Usages

BizTalk.Deployment provides three broad categories of functionalities. The first is provided by the top-level commands that allow to install or uninstall Microsoft BizTalk Server® applications. The secondary is twofold and provided by the commands that allows to consume code-first application bindings —see Be.Stateless.BizTalk.Dsl.Binding— on the one hand, and the commands that allows to configure SSO affiliate applications and their configuration stores —see Be.Stateless.BizTalk.Settings— on the other hand. The third is provided by the deployment tasks whose execution will be entrusted to Invoke-Build on the basis of the resources declared in the deployment manifest —see Resource.Manifest.

Installation

In order to be able to install the PowerShell module, you might have to trust the be.stateless’s certificate public key beforehand; see these instructions for details on how to proceed.