How to install BizTalk roles and features via PowerShell
When-ever you look at installation documentation for BizTalk servers, the first step is usually a list of roles and features you need to install. For each client however, this list might be a little different based on their needs and requirements.
PowerShell makes this easy to automate by the Install-WindowsFeature command
NOTE: First, ensure your servers are running at least PowerShell 5.0.
Running the Get-WindowsFeature command will show all the roles and features that are available to install. Select the ones that applicable for your BizTalk server setup. Now you can create a script to automate this installation.
This sample script below used for installing BizTalk Roles and Features also takes into account if the Windows Server source folder is not in the default location. This can sometimes be the case on locked down corporate networks.
1
param (
2
[string] $sourceFolder = ""
3
)
4
5
Write-Host "Installing the Roles and Features required for a BizTalk Server" -f Cyan
6
if ($sourceFolder -ne "")
7
{
8
if ((Test-Path -Path $sourceFolder) -eq $false)
9
{
10
Write-Error "Unable to find folder $sourceFolder. Please check and try again" -ErrorAction Stop
11
}
12
else
13
{
14
Write-Host "Confirmed that $sourceFolder is a valid folder." -f Green
15
}
16
}
17
18
if ($sourceFolder -eq "")
19
{
20
Install-WindowsFeature -Name 'Web-Server' -IncludeManagementTools
21
Install-WindowsFeature -Name 'Web-Http-Redirect'
22
Install-WindowsFeature -Name 'Web-Log-Libraries', 'Web-Request-Monitor', 'Web-Http-Tracing'
23
Install-WindowsFeature -Name 'Web-Dyn-Compression', 'Web-Basic-Auth', 'Web-Client-Auth', 'Web-Digest-Auth', 'Web-Cert-Auth', 'Web-IP-Security', 'Web-Url-Auth', 'Web-Windows-Auth'
24
Install-WindowsFeature -Name 'Web-App-Dev', 'Web-Mgmt-Compat', 'NET-Framework-Features' -IncludeAllSubFeature
25
Install-WindowsFeature -Name 'Web-Scripting-Tools', 'NET-WCF-HTTP-Activation45', 'NET-WCF-Pipe-Activation45', 'NET-WCF-TCP-Activation45'
26
}
27
else
28
{
29
Install-WindowsFeature -Name 'Web-Server' -IncludeManagementTools -Source $sourceFolder
30
Install-WindowsFeature -Name 'Web-Http-Redirect' -Source $sourceFolder
31
Install-WindowsFeature -Name 'Web-Log-Libraries', 'Web-Request-Monitor', 'Web-Http-Tracing' -Source $sourceFolder
32
Install-WindowsFeature -Name 'Web-Dyn-Compression', 'Web-Basic-Auth', 'Web-Client-Auth', 'Web-Digest-Auth', 'Web-Cert-Auth', 'Web-IP-Security', 'Web-Url-Auth', 'Web-Windows-Auth' -Source $sourceFolder
33
Install-WindowsFeature -Name 'Web-App-Dev', 'Web-Mgmt-Compat', 'NET-Framework-Features' -IncludeAllSubFeature -Source $sourceFolder
34
Install-WindowsFeature -Name 'Web-Scripting-Tools', 'NET-WCF-HTTP-Activation45', 'NET-WCF-Pipe-Activation45', 'NET-WCF-TCP-Activation45' -Source $sourceFolder
35
}
36
Write-Host 'All done.' -f Cyan
Copied!
If there are any suggestions on how to improve this, let me know.
Copy link