Two ways to loop through BizTalk Sendports using Powershell Extensions (ForEach & ForEach-Object)

The sample below shows the use of the “ForEach” and the “ForEach-Object”. I think the first method results in cleaner code. The second method using piping and the $_ to represent the anonymous object. Using Powershell ISE (Integrated Scripting Environment), both methods should give you command completion (i.e. if you type in $SendPort., you will […]

Restart Certain Receive Location with BizTalk Provider for Powershell

We have a custom Rabbit-MQ adapter that has a few issues. When we restart the host-instances, the adapter may get “stuck” unless we restart the associated receive locations. So, I wrote a Powershell to restart all RabbitMQ receive locations that are currently enabled. <pre> cls # # Restart All RabbitMQ Receive Locations that are currently […]

Powershell to build BTDF PortBindingMaster File

One of the pains of the BizTalk Deployment Framework (BTDF) is that frequently, you build a PortBindingMaster file, then you change your port names, or make other changes, and have to rebuild it manually. The manual process is to export the binding file, then carefully go through the file, making the changes to the BTDF […]

Powershell to Export BizTalk Bindings for An Application

I’m starting to write a script to build my BizTalk Deployment Framework Binding (BTDF) files. I’m planning to substite the few things that are unique with the BTDF variables. So the first step is to automate the export of the binding file. $appName = "Echo.BSSR.FrontEnd.LTLShipmentOut" $bindingsDirectory = "c:\Users\NWalters\AppData\Local\BizTalk\Binding Files" $exportFilename = "$bindingsDirectory.\$appName.xml" cd "Biztalk:\Applications" $app […]

Powershell to List Process IDs of BizTalk Host Instances

When you have many BizTalk host instances and you want to do a “Debug Attach” to one specific one (for example to debug a pipeline component), it really helps to know the process ID (else you might have to attach to many host instances). The Powershell code below conveniently lists the process ids along with […]