Why can't I get the Jenkins Powershell plugin to work? -
why can't jenkins "powershell plugin" work?
i can run powershell script on jenkins using "execute windows batch command" build step following command:
powershell -executionpolicy bypass -file script.ps1
but unable run powershell script jenkins "powershell plugin" using "windows powershell" build step , command, because of windows execution policy not set error disallowing run:
script.ps1
does know proper arg give jenkins "powershell plugin" succesfully run script? otherwise, use batch script work-around.
the correct thing set execution policy on machine (a one-time action), @ point won't need bypass every time, , jenkins plugin should "just work". unable to?
a reasonable starting setting remotesigned, allow execute local scripts fine still disallow scripts downloaded internet.
from elevated powershell prompt, run:
set-executionpolicy remotesigned
see also: http://technet.microsoft.com/library/hh849812.aspx
update: excerpt on applying policy , how it's supposed behave:
if set execution policy local computer (the default) or current user, change saved in registry , remains effective until change again.
of course, if machine on domain, group policy revert this.
Comments
Post a Comment