PowerShell extensions allow you to interact with BizTalk Artificacts. For example, you can like list applications, sendports, receive ports, host instances, and enable/disable them in PowerShell.
First run the InstallUtil
<pre>C:\Windows\system32>c:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe "c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Utilities\PowerShell\BizTalkFactory.PowerShell.Extensions.dll"</pre>
Output:
Microsoft (R) .NET Framework Installation utility Version 4.7.2558.0
Copyright (C) Microsoft Corporation. All rights reserved.
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the c:\Program Files (x86)\Microsoft BizTal
k Server 2013\SDK\Utilities\PowerShell\BizTalkFactory.PowerShell.Extensions.dll
assembly’s progress.
The file is located at c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\
Utilities\PowerShell\BizTalkFactory.PowerShell.Extensions.InstallLog.
Installing assembly ‘c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Ut
ilities\PowerShell\BizTalkFactory.PowerShell.Extensions.dll’.
Affected parameters are:
logtoconsole =
assemblypath = c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Utili
ties\PowerShell\BizTalkFactory.PowerShell.Extensions.dll
logfile = c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Utilities\
PowerShell\BizTalkFactory.PowerShell.Extensions.InstallLog
The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the c:\Program Files (x86)\Microsoft BizTal
k Server 2013\SDK\Utilities\PowerShell\BizTalkFactory.PowerShell.Extensions.dll
assembly’s progress.
The file is located at c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\
Utilities\PowerShell\BizTalkFactory.PowerShell.Extensions.InstallLog.
Committing assembly ‘c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Ut
ilities\PowerShell\BizTalkFactory.PowerShell.Extensions.dll’.
Affected parameters are:
logtoconsole =
assemblypath = c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Utili
ties\PowerShell\BizTalkFactory.PowerShell.Extensions.dll
logfile = c:\Program Files (x86)\Microsoft BizTalk Server 2013\SDK\Utilities\
PowerShell\BizTalkFactory.PowerShell.Extensions.InstallLog
The Commit phase completed successfully.
The transacted install has completed.
Next, in Powershell (assuming you have already set your execution policy):
If your SQL Server is on same machine as BizTalk this should work:
<pre>Add-PSSnapIn -Name BiztalkFactory.PowerShell.Extensions
#Verify it works by listing the BizTalk Applications
cd "Biztalk:\Applications\"
Get-ChildItem | ft -auto
</pre>
If you SQL Server is on a different machine than the BizTalk server, then add the New-PSDrive statement as below (StackOverflow)
<pre>
Add-PSSnapIn -Name BiztalkFactory.PowerShell.Extensions
New-PSDrive -Name BizTalk -Root BizTalk:\ -PsProvider BizTalk -Instance MySqlServer -Database BizTalkMgmtDb
#Verify it works by listing the BizTalk Applications
cd "Biztalk:\Applications\"
Get-ChildItem | ft -auto
</pre>