-ExecutionPolicy is a PowerShell startup parameter that specifies the execution policy for the launched session. It can override both local and Group Policy settings. section 4.1.1
Use the parameter when you need to:
- Launch PowerShell with a specified execution policy instead of changing the machine-wide setting. section 4.1.1
- Work around a local or Group Policy-defined setting for that launched session. section 4.1.1
Launching with an execution policy
Run PowerShell.exe with the -ExecutionPolicy command-line switch and the desired policy value. Unlike Set-ExecutionPolicy, this startup choice overrides local and Group Policy settings. section 4.1.1
Use the script-loading error to recognize when the current execution policy prevents scripts from running. section 4.1.1
