4 ms·
This is not a security feature, and should not be relied upon. For example, unelevated users can run the following command: 'PS> Set-ExecutionPolicy Bypass -Sc
by SCHiM 10y ago
This is not a security feature, and should not be relied upon.
For example, unelevated users can run the following command:
'PS> Set-ExecutionPolicy Bypass -Scope Process' to allow script execution in the current powershell process.
Also, you can pass complete powershell scripts over the command line which bypasses the script restriction (because you can just input your entire script over the command line).
This is done with the -E (-EncodedCommand) flag. Which takes a base64 encoded string with statements separated by semi-colons.
- pjmlp 10y agoAs occasional Powershell user I wasn't aware of it, thanks for the heads up.