What is the cleanest way to unbind an orchestration using PowerShell?
I’d like to have something that works on both 32bit and 64bit platform.
I know I can load and use the Microsoft.BizTalk.ExplorerOM assembly (forcing 32bit mode with something like “Start-Job -RunAs32”) and do something similar to what is explained here: http://msdn.microsoft.com/en-us/library/dd792703(v=bts.10).aspx
But I’d like to find something better.
I see the sample script you linked is loading this DLL from the GAC:
I’m not familiar with this assembly but if it’s pre-compiled to x86 in the GAC then you’ll need to load it with 32bit PowerShell (when on a 64bit Windows system). In your script you can do a check to see what PowerShell process bitness is:
If your script is not running in the right bitness there’s three things I can think of:
Re-launch your script using 32 bit PowerShell (doesn’t work well if your script has params):