PDA

View Full Version : Powershell, Windows 2008 R2, VBP 6.7a and me :)


ericp
03-16-2010, 03:57 PM
Short of upgrading to v7.x of VBP, is there something I'm missing getting Powershell commands from working?

Whenever I try to run a 'shell script I get:


File C:\Users\VMMSER~1\AppData\Local\Temp\1\VisDB65.tmp .ps1 cannot be loaded be
cause the execution of scripts is disabled on this system. Please see "get-help
about_signing" for more details.
At line:1 char:55
+ C:\Users\VMMSER~1\AppData\Local\Temp\1\VisDB65.tmp .ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException


If I run:


PS C:\Users\vmmservice> get-ExecutionPolicy
Unrestricted
PS C:\Users\vmmservice>


I can get the same bld file (a sample BLD provided in these forums, actually) to run properly in WinXP, but I can't get it to run in Win2k8R2.

I run VBP as Administrator, in WinXP SP3 compatibility mode. I've tried changing the DEP to exclude VBP, however, that just crashes VBP on startup.

Thanks in advance!

Eric.

kinook
03-16-2010, 04:09 PM
Make sure you've set the execution policy in the 32-bit version of PowerShell or that you're invoking the 64-bit version of PowerShell from Visual Build (i.e., %WINDIR%\Sysnative\WindowsPowerShell\v1.0\powershe ll.exe in the Override field on the Options tab).
http://www.kinook.com/VisBuildPro/Manual/6432bit.htm
http://www.kinook.com/VisBuildPro/Manual/powershellopttab.htm

ericp
03-17-2010, 08:23 AM
/bow


'Unrestricting' the 32bit version was the key.

Thank you again!

Eric.