How to Enable Running Scripts in PowerShell

PowerShell is one of the most powerful tools built into Windows — but the first time many users try to run a .ps1 script, they hit a wall. The error message usually looks something like this:

This isn't a bug. It's a deliberate security feature called execution policy, and understanding how it works is the key to getting your scripts running safely.

What Is PowerShell Execution Policy?

Execution policy is a safety mechanism in PowerShell that controls which scripts are allowed to run on a system. Microsoft ships Windows with a restrictive default to prevent malicious scripts from running automatically — for example, in phishing attacks or malware that disguises itself as a .ps1 file.

There are several execution policy levels, and each one draws the line differently:

PolicyWhat It Allows
RestrictedNo scripts at all (Windows default on most consumer installs)
AllSignedOnly scripts signed by a trusted publisher
RemoteSignedLocal scripts run freely; downloaded scripts must be signed
UnrestrictedAll scripts run, with a warning for downloaded ones
BypassNothing is blocked, no warnings — typically used in automation

For most personal or developer use cases, RemoteSigned is the practical sweet spot: it keeps you protected from untrusted downloaded content while letting you run scripts you've written yourself.

How to Check Your Current Execution Policy

Before changing anything, it helps to know where you're starting from. Open PowerShell and run: