PowerShell Execution Policy Error — Script Cannot Be Loaded
Warningsystem
Overview
Fix PowerShell 'cannot be loaded because running scripts is disabled on this system' error by understanding and configuring execution policies.
Key Details
- PowerShell execution policy controls which scripts can run on the system
- Default policy on Windows is Restricted — no scripts can run, only interactive commands
- Error message: 'File cannot be loaded because running scripts is disabled on this system'
- Execution policies: Restricted, AllSigned, RemoteSigned, Unrestricted, Bypass
- Policy can be set at Machine, User, or Process scope
Common Causes
- Default Restricted execution policy blocking all PowerShell scripts
- Group Policy enforcing a restrictive execution policy in corporate environments
- Script downloaded from internet marked as 'blocked' by Windows zone identifier
- Running script in wrong scope (User policy set but running as a different user)
Steps
- 1Check current policy: Get-ExecutionPolicy -List (shows all scopes)
- 2Set for current user: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- 3For a single session only: Set-ExecutionPolicy Bypass -Scope Process
- 4Unblock a specific downloaded script: Unblock-File -Path .\script.ps1
- 5Run PowerShell as Administrator to set Machine-scope policies
- 6If controlled by Group Policy: contact your IT administrator to adjust the policy
Tags
powershellexecution-policyscript-blockedrestrictedsecurity
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 recommended: it allows local scripts to run freely but requires downloaded scripts to be signed. This balances usability and security.