Skip to content

Instantly share code, notes, and snippets.

$Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$Catalog.ConnectionString = "SERVER=xxxxx;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"
foreach($port in $catalog.SendPorts)
{
$portname = $port.name
$portapplication = $port.application.name
$portstatus = $port.status
Write-Host "Name: $portname App: $portapplication Status: $portstatus"
}
[System.Reflection.Assembly]::loadwithPartialName("Microsoft.BizTalk.ExplorerOM")
## - Force 32-bit mode, BizTalk.ExplorerOM does NOT support 64-bit mode
if ($env:Processor_Architecture -ne "x86")
{
write-warning "Running x86 PowerShell..."
if ($myInvocation.Line)
{
&"$env:WINDIR\syswow64\windowspowershell\v1.0\powershell.exe" -NonInteractive -NoProfile $myInvocation.Line
}