Overview#
This command sets the execution policy to Unrestricted only for the current PowerShell process. It does not permanently change machine or user policy settings.
Command#
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
What this does#
-ExecutionPolicy Unrestricted: Allows all scripts to run, including unsigned scripts.-Scope Process: Applies only to the current PowerShell window/process.- When the session closes, the policy change is removed automatically.
Verify Current Effective Policy#
Get-ExecutionPolicy -List
Look for the Process row to confirm the temporary setting is active.
Security Note#
Use this scope when you need a temporary policy change for a trusted script. For safer day-to-day usage, consider RemoteSigned instead of Unrestricted.