3
votes

I'm writing a configuration script for a BizTalk server I need to create a few adapters.

In the "BizTalk Server Administration" application this is done by going to Biztalk Server Group / Platform Settings / Adapters and choosing New / Adapter from the right-click menu.

I'd like to automate this process somehow, using a Powershell script or a SQL script. I tried to use the adm_Adapter_Create stored procedure in teh Biztalk DB but it doesn't work all the way as no send / recieve handlers get configured.

Is there any way to automate this adapter creation?

2
Don't know if this is a question for ServerFault.com? - rickythefox

2 Answers

4
votes

You need to use WMI for this with the MSBTS_AdapterSetting class. There's some example code for this here.

2
votes

Part of a Powershell script I wrote to solve this:

$adapterClass = [WMIClass] "root\MicrosoftBizTalkServer:MSBTS_AdapterSetting"

$adapter = $adapterclass.CreateInstance()
$adapter.Name = $adapterXml.name
$adapter.Comment = $adapterXml.comment
$adapter.Constraints = $adapterXml.constraints
$adapter.MgmtCLSID = $adapterXml.MgmtCLSID
$adapter.put() | Out-Null