zzz cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.To get around it, the traditional way is to call Set-ExecutionPolicy RemoteSigned, but that can be difficult too, since you need to set it for the same user and architecture (x86 or x64) that TeamCity is running under. Rather then mess with that, Powershell's command line offers a five-second workaround:
-ExecutionPolicy ByPass
In the teamcity powershell build step, just add -ExecutionPolicy ByPass to the command line arguments, and you will be able to execute ps1 files to your heart's content.
Hi, I am trying to call a VBS file from Team City, below is the configuration..
ReplyDeleteScript : File
Script File: Test.PS1
Script Execution Mode: Put script into powershell stdin with "-command-" arguments
But getting the error like:
Cannot start build runner: Cannot run process C:\WINDOWS\sysnative\cmd.exe /c C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -ExecutionPolicy ByPass -Command - < C:\BuildAgent\work\2d7908fc7e0f07c9\Test.PS1 : file not found
Thanks,