Monday, March 28, 2011

Management_Install.ps1 cannot be loaded because the execution of scripts is disabled on this system



You might have seen the above when attempting to install the BizTalk ESB Management Portal on a 64-bit operating system.

This particular error has been talked about a lot in the community with the solution but I wanted to detail here in a little bit more detail.

It requires Visual Studio 2010 to compile the code so this is for a development environment:

  1. Start the Windows Powershell command window from the following path: C:\Windows\syswow64\WindowsPowerShell\v1.0\Powershell.exe
  2. Edit the Management_Install.ps1 script and alter the line that sets the VS environment variable to this: $env:VS="${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE"
  3. Run: set-executionpolicy unrestrictedBold
  4. Run the Management_Install.bat from the current powershell command window (don't forget to include current directory i.e. .\Management_Install.bat (notice the .\)
The above should successfully use Visual Studio to build the Management Portal. Of course a better way of doing it would be to use something other than Visual Studio like pure MSBuild.

I need to write something that is suitable for a production environment, so when I do I'll post it here.

1 comment:

Anonymous said...

Hi Simon, it's weird that I've resolved the similar issue a few days ago with very similar approach. Albeit a manual one coz I'm new to powershell. Thanks for sharing your experience :-)

-Darmawan