The PowerShell execution policy can be bypassed on a case-by-case basis using -ex bypass
; for example:
The
-ex bypass
flag isn’t necessary when executing code directly with-c
.
This can also be set temporarily within a shell:
However, this will not bypass other protections, in particular AMSI!