After a restart, first powershell wants an Execution Policy Change
hello all,
i fouled when tried set executionpolicy remotesigned via gpo. have since removed , have reviewed several forum posts, none have "fixed" problem.
i reboot , login.
the first powershell script run, via right-click & 'run powershell' causes "execution policy change" prompt appear. appears before in script has run.
doing get-executionpolicy -list results in 5 returns. machinepolicy, userpolicy, , currentuser return undefined, process returns bypass, , localmachine returns remotesigned.
i've been doing testing on machine , here see. first command in script get-executionpolicy -list
i restart , login. run powershell via powershell shortcut. no prompt. process undefined, not bypass.
restart , login. right click script , prompt. say y , process bypass.
restart , login. right click script , prompt. say n , process undefined.
restart , login. run powershell, cd script location, .\script , no prompt. process undefined. right-click script , run , no prompt, process bypass.
if run same script again, there no prompt , process bypass. no matter how answered first time.
what gives? why trying (apparently) set process bypass? why prompt first time after restart of system? why when execute script via right-click? 2 different machines, 2 different scripts. same results.
-g
of course, last response wasn't answer. go on msdn. if hadn't done that. since couldn't find answer, gave , blew away vm , built new one. since takes little bit of time @ stage at, acceptable solution.
the answer was, "don't again". lol
blessings,
-g
Windows Server > Group Policy
Comments
Post a Comment