I’m new to BizTalk and am unsure how to approach something. I am using the BizTalkFactory.Powershell.Extensions SnapIn which I have scripted some things like starting and stopping host instances etc. This script works just fine when I run it as x86. However I also have some code that does a bunch of other things like creating, stopping removing IIS application pools etc which seem to not work as x86. If I add all my code snipits into one continuous script as I need to I have to switch back and forth between x86 and x64.
Is there a way to load the BizTalk snapin to run under x64 or call the x86 snipits from the x64 script? I currently have something like:
&C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe { Write "Switch to 32-bit mode to register Powershell extension" LoadBizTalkSnapin StopHostInstances StopApplications UninstallBizTalkApplications Write "Exit this instance of 32 bit shell" } UninstallApplications StopApplicationPools if($BareBones){ RemoveApplicationPools RemoveFromGAC DeleteFolder &C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe { Write "Switch to 32-bit mode to register Powershell extension" RemoveAdapterBinding RemoveHost RemoveHostInstance Write "Exit this instance of 32 bit shell" } }
Previously when I tested the code below it worked:
&C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe { Add-PSSnapin -Name BizTalkFactory.Powershell.Extensions New-PSDrive -Name BizTalk -PSProvider BizTalk -Root "BizTalk:\" -Instance $DBInstance -Database BizTalkMgmtDb }
However, once I changed the actual code to refer to functions I have written it no longer worked. Any help in pointing me in the right direction would be extremely appreciated.