3
I know that you can bypass the current execution policy in PowerShell by passing -ExecutionPolicy Bypass
at the command line, but what does this actually do?
I know it allows scripts to run, but I'm assuming it stops a standard user from running cmdlets that could compromise a system/network?
If you're asking why I want to let standard users run PowerShell scripts, we basically have an application on the network that has a number of switches that can be passed to it. At times, the user may need to changes these switches. So I'm thinking PowerShell might be the best way forward.
The script looks like this:
$app = "C:\Path\To\Application.exe"
$path = "C:\Path\To\File.dat"
$switches = @('/switch1', '/switch2', '/switch3')
Start-Process $app "-File ""$path"" ""$switches"""
I think changing the execution policy might be a bit too much in this case. So I might just go back to lovely batch scripts instead. But at least now I know what Bypass actually does. Thanks. – Jake – 2015-11-25T07:14:37.610