Unenlist (start/stop) Orchestration in PowerShell

Suppose you want to list all orchestrations in an application, and then start, stop, unenlist, or enlist them.

It’s not object oriented. You don’t say $orch.unenlist, you use the command followed by the orchestration name.

There are four commandlets:
1. Enlist-Orchestartoin
2. Start-Orchestration
3. Stop-Orchestration
4. Unenlist-Orchestration

#unenlist all orchestration in a BizTalk application 
#Add-PSSnapIn -Name BiztalkFactory.PowerShell.Extensions  
#NOTE: Must be in 32-bit version of Powershell to use this SnapIn
$appName = "TL2000"
cd "Biztalk:\Applications\$appName\Orchestrations"

#list the orchestrations and some of their properties 
#(only for debug, not needed to run below)
Get-ChildItem | ft -auto 

$orchs = Get-ChildItem  #get them into a variable so we can loop 
foreach ($orch in $orchs) 
  Write-Host "Orch Name: $($orch.Name)" 
  Unenlist-Orchestration -Path $orch.Name 



Leave a Reply