Your Guide to How To Run a .ps1 File In Powershell

What You Get:

Free Guide

Free, helpful information about Computers & Operating Systems and related How To Run a .ps1 File In Powershell topics.

Helpful Information

Get clear and easy-to-understand details about How To Run a .ps1 File In Powershell topics and resources.

Personalized Offers

Answer a few optional questions to receive offers or information related to Computers & Operating Systems. The survey is optional and not required to access your free guide.

How to Run a .ps1 File in PowerShell

PowerShell scripts — saved with the .ps1 file extension — are powerful automation tools built into Windows. But if you've ever double-clicked a .ps1 file and nothing happened, or tried to run one and hit an error, you're not alone. Running a PowerShell script isn't quite as straightforward as launching a regular program, and that's by design.

What Is a .ps1 File?

A .ps1 file is a plain-text script written in the PowerShell scripting language. It can contain anything from a single command to hundreds of lines of logic — automating backups, managing users, configuring system settings, or pulling data from APIs.

Windows doesn't run these files on double-click by default. Instead, it opens them in a text editor. This is a deliberate security measure, not a bug.

Why PowerShell Blocks Scripts by Default

PowerShell uses a setting called the Execution Policy to control whether scripts can run on a system. Out of the box, most Windows machines are set to Restricted, which blocks all .ps1 files from executing — even ones you wrote yourself.

The four most common execution policy levels are:

PolicyWhat It Allows
RestrictedNo scripts. Interactive commands only.
AllSignedScripts must be signed by a trusted publisher.
RemoteSignedLocal scripts run freely; downloaded scripts must be signed.
UnrestrictedAll scripts run, with warnings for downloaded files.

Most users working with their own scripts set the policy to RemoteSigned, which strikes a practical balance between usability and security.

How to Check Your Current Execution Policy

Before running any script, open PowerShell and type: