The account I'm using has sysadmin access to the database that is on DATABASE_SERVER. However, I could not log in to the box remotely with the same account. ManagementScope sounds like WMI. Do you think
I need admin access to the box that houses BizTalk databases? Note that BizTalk 2010 is not installed on the DATABASE_SERVER.
I think this is relevant section of the log.
Target "PrepareHostAndHostInstances" in file "E:\ParameterizedBizTalkConfig\PrepareHostAndHostInstances.xml" from project "E:\ParameterizedBizTalkConfig\ConfigureBizTalk.xml" (target "Default" depends on it):
Using "MSBuild.ExtensionPack.BizTalk.BizTalkHost" task from assembly "E:\ParameterizedBizTalkConfig\MSBuildExtensionPack\MSBuild.ExtensionPack.BizTalk.dll".
Connecting to BtsCatalogExplorer: Server: DATABASE_SERVER. Database: BizTalkMgmtDb
ManagementScope Set: \\DATABASE_SERVER\root\MicrosoftBizTalkServer
CheckExists Host: SingleReceiveHost on: DATABASE_sERVER
E:\ParameterizedBizTalkConfig\PrepareHostAndHostInstances.xml(27,5): error : UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r [E:\ParameterizedBizTalkConfig\ConfigureBizTalk.xml]
E:\ParameterizedBizTalkConfig\PrepareHostAndHostInstances.xml(27,5): error : [E:\ParameterizedBizTalkConfig\ConfigureBizTalk.xml]
Done executing task "MSBuild.ExtensionPack.BizTalk.BizTalkHost" -- FAILED.
Done building target "PrepareHostAndHostInstances" in project "ConfigureBizTalk.xml" -- FAILED.
Done executing task "CallTarget" -- FAILED.
Done building target "Default" in project "ConfigureBizTalk.xml" -- FAILED.
Done Building Project "E:\ParameterizedBizTalkConfig\ConfigureBizTalk.xml" (default targets) -- FAILED.
Thanks for looking into the other issue. As a workaround, I copy the extensionpack dll references into the folder where my script is and zip the entire folder, move that folder to the server on which I need to run the
script and execute on the server. It worked beautifully in DEV where BizTalk Server and databases were on the same box. I'm getting the UnauthorizedException in STAGE as explained above.