SteveC
SteveC

Reputation: 16823

How can you programatically create a receive location?

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.

Upvotes: 1

Views: 946

Answers (1)

Bitmask
Bitmask

Reputation: 958

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.

Upvotes: 3

Related Questions