PowerShell Execution Policy Restricted — Scripts Cannot Be Run on This System
Warningsystem
Overview
Fix PowerShell 'running scripts is disabled on this system' error caused by the execution policy preventing script files from executing.
Key Details
- PowerShell's execution policy controls whether scripts (.ps1 files) are allowed to run
- Default policy on Windows is 'Restricted' which blocks all script execution
- The error 'cannot be loaded because running scripts is disabled on this system' appears for any .ps1 file
- Execution policies: Restricted, AllSigned, RemoteSigned, Unrestricted, Bypass
- This is a safety feature to prevent accidentally running malicious scripts
Common Causes
- Default execution policy is Restricted on fresh Windows installations
- Group Policy enforcing a restrictive execution policy organization-wide
- User trying to run a downloaded script that has the Mark of the Web (MOTW)
- Execution policy set at a higher scope (Machine/Group Policy) overriding user preference
Steps
- 1Check current policy: run 'Get-ExecutionPolicy -List' in PowerShell to see all scopes
- 2Set to RemoteSigned (recommended): run 'Set-ExecutionPolicy RemoteSigned -Scope CurrentUser' in admin PowerShell
- 3For one-time script execution: run 'powershell -ExecutionPolicy Bypass -File script.ps1'
- 4Unblock a specific downloaded script: right-click > Properties > check 'Unblock' or run 'Unblock-File script.ps1'
- 5For development: use RemoteSigned which allows local scripts but requires downloaded scripts to be signed
Tags
powershellexecution-policyrestrictedscriptssecurity
Related Items
More in System
windows-C000021A-status-system-process-terminatedWindows Error 0xC000021A — STATUS SYSTEM PROCESS TERMINATED
Criticalwindows-C0000225-boot-configuration-errorWindows Error 0xC0000225 — Boot Configuration Error
Criticalwindows-C000000F-boot-selection-failedWindows Error 0xC000000F — Boot Selection Failed
Criticalwindows-80004005-unspecified-errorWindows Error 0x80004005 — Unspecified Error
Warningwindows-80070570-file-or-directory-corruptedWindows Error 0x80070570 — File or Directory Corrupted
Errorwindows-system-0xc0000185Windows Error 0xC0000185 — Boot Device Inaccessible
CriticalFrequently Asked Questions
RemoteSigned is the recommended setting for most users. It allows locally created scripts to run freely while requiring downloaded scripts to be digitally signed. It balances security and usability.