Orchestrator 2012 PowerShell script fails to run

This week I added an Orchestrator 2012 Runbook server to an existing one for scale-out and high availability reasons. Very soon it was ready to go and I was making some additional runbooks to use together with SCOM. In these runbooks were Run .Net Script activities with PowerShell scripts in there. And I noticed the script activities would refuse to run. Except when I ran them separately as a normal PowerShell script. SO I went in the history and checked what had happened:
File C:\Program Files\System Center Operations Manager 2012\Powershell\OperationsManager\OperationsManager.psm1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
O right! So I opened up a PowerShell prompt using Run As Administrator and I typed “Set-ExecutionPolicy Unrestricted“.
And the script failed to run again! Wait a second perhaps it is because I forgot to run the same command on the other runbook server. Oops. OK running that command again and….
Fail!
What?
I went searching for it and I saw a comment in a thread somewhere saying it could be that the same command needs to be done for the 64 bit version of PowerShell as well!
Open:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
and type:
Set-ExecutionPolicy Unrestricted
Did this on all Runbook servers this time as well B)
And try again. Working fine!