Use this topic when a script is blocked, effective policy differs from the value you changed, downloaded-script signing requirements apply, or you need to distinguish policy behavior from actual Windows authorization/security controls.
Execution Policy
Execution policy is a PowerShell safety feature that controls conditions for loading configuration files and running scripts on Windows. It can be set at multiple scopes, with Group Policy scopes able to override local settings. Microsoft explicitly documents that execution policy is not a security boundary.
1. Get-ExecutionPolicy -List — which scope sets it (MachinePolicy/UserPolicy win)?
2. Set: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser.
3. Downloaded file → Unblock-File.
4. GPO-defined → change the GPO.
5. Remember: it is a safety feature, not a security boundary.
policy scopes (MachinePolicy, UserPolicy, Process, CurrentUser, LocalMachine) → effective policy → script allowed or blocked
After policy resolution, validate code/source and test target authorization/state separately.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Do not set Bypass machine-wide merely to make an error disappear. Do not describe execution policy as malware prevention or privilege enforcement. A user allowed to execute code can often run equivalent code in other ways, so real security must rely on access control, application control and other controls.
Operational reference
Fast context before you go deeper.
Get-ExecutionPolicy -ListPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Capture all scopes and the exact script path/origin. Reproduce with the intended host/user. If policy is the first failing step, correct the approved policy/signing/origin issue. Then continue to normal script dependency and target authorization checks.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Execution policy is not a security boundary and can be bypassed by a determined user with code-execution rights.
- Effective policy comes from scope precedence, not simply the LocalMachine value.
- MachinePolicy/UserPolicy set by Group Policy can override local Process/CurrentUser/LocalMachine settings.
- RemoteSigned concerns scripts marked as coming from the Internet zone; origin/marking matters.
- Changing execution policy does not grant filesystem, Registry, network or administrative permissions.
$PSVersionTable— PowerShell edition and versionGet-Command <name>— which cmdlet/function/exe runsGet-Help <cmdlet> -Full— syntax and parametersGet-ExecutionPolicy -List— execution policy per scope
ReferenceWhat it is1 section · depth on demand
Core model
Execution policies help prevent accidental execution of untrusted scripts and define signature/origin expectations. The key troubleshooting concept is scope precedence: changing one scope may have no visible effect if a higher-precedence scope is defined.
ReferenceImportant terms & boundaries2 sections · depth on demand
PowerShell boundary
Use Get-ExecutionPolicy -List instead of only Get-ExecutionPolicy. If Group Policy is enforcing MachinePolicy or UserPolicy, local changes cannot override it. A script blocked under RemoteSigned may also require investigation of its source/zone mark or signature rather than weakening policy globally.
In depth
Execution policy controls whether scripts may run; it is a safety setting against accidental execution, not a security boundary.
| Policy | Effect |
|---|---|
| Restricted | No scripts (client default) |
| RemoteSigned | Local scripts run; downloaded scripts (Mark of the Web) must be signed (server default) |
| AllSigned | All scripts must be signed |
| Bypass | Nothing blocked |
Get-ExecutionPolicy -List
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
Unblock-File .\script.ps1
Real protection comes from App Control for Business/AppLocker (Constrained Language Mode) and logging (script block logging, transcription).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PowerShell → Execution Policy. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
PowerShell → Execution Policy reference map
Fast lookup boundaries for PowerShell → Execution Policy.
| Item | Meaning | Evidence boundary |
|---|---|---|
| MachinePolicy/UserPolicy | Group Policy scopes | can dominate local configuration |
| Process | Current session scope | lost when process ends |
| CurrentUser | User-level configured policy | not machine-wide |
| LocalMachine | Computer-level configured policy | requires appropriate rights to change |
| Effective policy | Result after precedence | not an authorization/security boundary |