Question

How can you programatically create a BizTalk receive location in PowerShell?

And extending the question ... receive ports and send ports

I've been using the BizTalk PowerShell provider, but unfortunately its New-Item method doesn't support these artefacts.

Was it helpful?

Solution

You can use explorerOM

[void] [System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")
$server = "."
$connectionString = "SERVER=" + $server + ";DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"
$Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$Catalog.ConnectionString = $connectionString

You will have to add a new Application using "AddNewApplication"

$app = $Catalog.AddNewApplication()
$rcvPort = $app.AddNewReceivePort(0)
$rcvLocation = $rcvPort.AddNewReceiveLocation()

Define properties for the receive port and location.

Good Luck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top