I hate it when I find a new — and very easy — solution to a problem. I’ve only recently discovered the parameter -ExecutionPolicy to the powershell.exe application and the value “Bypass.” It allows you to, you guessed it, bypass whatever execution policy is set even if it’s restricted. Non-admins can use it too… which at first seems really stupid but the bypass does not elevate anything so if they don’t have rights, they don’t have rights.
Anyway, that’s probably been around forever and I feel really stupid for just learning about it. I discovered it when I had a script run at startup on a machine that didn’t have an execution policy set to something other than restricted and I saw the command line for the process using that parameter.
Even though I feel really stupid I’m glad I found it 🙂
You must be logged in to post a comment.