.PS1

PS1 File

Windows PowerShell Script
Ask a question
QUICK ANSWER

A PS1 file is a Windows PowerShell script - a plain-text file with commands that automate tasks on Windows, macOS, or Linux. On Windows, right-click it and choose "Run with PowerShell." If Windows blocks it, adjust the execution policy or unblock the file via Properties. Always read a PS1 script before running it; it is the most common malware script format on Windows.

Developer: Microsoft Corporation Category: Executable Files Open standard MIME: application/x-powershell
OPENS ON Windows macOS Linux Web
Related: .APK · .EXE · .VBS · .JAR

On this page

19k+ extensions indexed
Last reviewed Aug 28, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the PS1 file format?

A .ps1 file is a plain-text script written in the PowerShell scripting language, developed by Microsoft. PowerShell launched in November 2006 with Windows PowerShell 1.0 as a modern replacement for older .bat and .cmd batch scripts, built on an object-oriented shell running on the .NET runtime.

Scripts contain sequences of cmdlets, functions, variables, and control-flow statements. An optional #Requires header at the top specifies a minimum PowerShell version or required modules, and a param() block declares script parameters. On Windows, execution is blocked by default - the ExecutionPolicy is set to Restricted, so a script will not run until the policy is relaxed with Set-ExecutionPolicy or the file is launched via right-click → Run with PowerShell.

Two active branches exist side by side:

  • Windows PowerShell 5.1 - built into Windows 10 and 11; defaults to UTF-16 LE encoding; no longer actively developed.
  • PowerShell 7 (formerly PowerShell Core) - cross-platform on Windows, macOS, and Linux; defaults to UTF-8 without BOM; actively maintained.

Both branches read .ps1 files identically. Authenticode code signing (via Set-AuthenticodeSignature) appends a # SIG # Begin signature block trailer to the file; editing the file afterwards invalidates the signature.

Security & safety

RISK: HIGH

PS1 is the #1 Windows scripting malware vector. PowerShell can download payloads, bypass UAC, disable antivirus, encrypt files (ransomware), and exfiltrate data. Default Windows ExecutionPolicy (Restricted) blocks execution, but attackers routinely bypass it with -ExecutionPolicy Bypass or by encoding scripts in Base64 (-EncodedCommand). Red flags: scripts that run Invoke-WebRequest/IEX (Invoke- Expression), disable antivirus, or arrive as email attachments. Safe practice: always read the script in a text editor before running; use PowerShell Script Block Logging (EventID 4104) on corporate systems. Signed scripts (Set- AuthenticodeSignature with a trusted cert) are safer but not immune.

Format details

in a nutshell
FULL NAMEWindows PowerShell Scriptaka PowerShell Script, PS1 Script File
DEVELOPERMicrosoft Corporationsince November 14, 2006 (Windows PowerShell 1.0)
MIME TYPEapplication/x-powershell
TYPEPlain-text script (PowerShell scripting language)
STANDARDOpen · royalty-free
This extension is also used by…
  • Adobe PostScript Level 1 file (.ps) - Rare: some systems associate .ps1 with PostScript level 1 files, distinct from PowerShell scripts.

Programs that open PS1 files

Windows5 apps
Notepad Open-source Open for editing with PowerShell syntax highlighting. Does not execute scripts.
Windows PowerShell 5.1 Built-in Right-click the .ps1 → 'Run with PowerShell'. To edit: right-click → 'Edit' (opens PowerShell ISE). To run in terminal: powershell.exe -File script.ps1
PowerShell 7 (PowerShell Core) Open-source Install from microsoft.com or winget (winget install Microsoft.PowerShell). Run: pwsh -File script.ps1
Visual Studio Code + PowerShell Extension Open-source Open the .ps1 file, install the 'PowerShell' extension (ms-vscode.powershell) for syntax highlighting, IntelliSense and integrated debugging. Run via F5 or the terminal panel.
PowerShell ISE Built-in Built into Windows; right-click PS1 → Edit, or launch 'Windows PowerShell ISE' from Start. Note: ISE is frozen at PowerShell 5.1 and deprecated - VS Code is the modern replacement.
macOS2 apps
PowerShell 7 (PowerShell Core) Open-source Install via Homebrew (brew install powershell) or pkg from GitHub. Run: pwsh script.ps1
Visual Studio Code + PowerShell Extension Open-source Same as Windows; run PS1 directly from VS Code terminal using PowerShell 7.
Linux1 app
PowerShell 7 (PowerShell Core) Open-source Install via apt/dnf/snap (snap install powershell --classic). Run: pwsh script.ps1
Web1 app
Azure Cloud Shell Free Run PowerShell scripts directly in the browser against Azure resources; no local install needed.

Technical details

deep spec
EncodingUTF-16 LE (Windows PowerShell 5.1 / ISE default) or UTF-8 without BOM (PowerShell 7 default)
Byte order markUTF-16 LE BOM (FF FE) common from ISE; PowerShell 7 omits BOM by default
ContainerPlain text; no binary wrapper
MIME typeapplication/x-powershell (also text/x-powershell and text/plain)
Script structureCmdlets, functions, variables, control-flow; optional #Requires and param() blocks
Execution policyBlocked by default on Windows (Restricted); requires Set-ExecutionPolicy or right-click Run with PowerShell
Code signingAuthenticode via Set-AuthenticodeSignature; # SIG # Begin signature block appended as plain-text trailer; editing the file invalidates the signature
Runtime.NET Framework (Windows PowerShell 5.1); .NET 5+ (PowerShell 7)
Cross-platform supportWindows, macOS, Linux - PowerShell 7 only; Windows PowerShell 5.1 is Windows-only
Module integrationScripts can dot-source .psm1 module files and reference .psd1 module manifests
Version directive#Requires -Version X.Y enforces minimum PowerShell version; #Requires -Modules enforces module availability
Typical size1 KB - 1 MB; most scripts under 100 KB
Related script formats.psm1 (module), .psd1 (manifest), .ps1xml (type and format data)
ReleasedNovember 14, 2006 (Windows PowerShell 1.0)
Latest versionPowerShell 7.5 (2025); format itself is plain text with no version field
Open standardYes · royalty-free
Specificationlearn.microsoft.com

PS1 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with PS1 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about PS1 files.

Frequently asked questions

How do I run a PS1 file on Windows?
Right-click → 'Run with PowerShell'. If blocked by execution policy, open PowerShell as Administrator and run: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned, then try again. Or right-click the file → Properties → Unblock first.
PowerShell says 'running scripts is disabled on this system' - how do I fix it?
This is the ExecutionPolicy. Run PowerShell as Administrator and execute: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. This allows locally created scripts and signed remote scripts. Corporate machines may have Group Policy that overrides this.
How do I open and edit a PS1 file?
Right-click → 'Edit' opens it in PowerShell ISE (Windows, built-in). Better: open it in Visual Studio Code with the PowerShell extension for modern editing. Any text editor also works for reading.
Is a PS1 file safe to open?
Opening (editing/reading) is safe - it's just text. Running it is another matter. PS1 is the most common malware script format on Windows; always read the contents before executing, especially if received by email or downloaded from unknown sources.
Can PS1 files run on Mac or Linux?
Yes - install PowerShell 7 (cross-platform, open-source) from Microsoft, then run: pwsh script.ps1. However, scripts using Windows-only cmdlets (Get-WmiObject, registry, COM) will fail.
How do I schedule a PS1 script to run automatically?
Use Windows Task Scheduler: create a task, set Action to Start a Program, program = powershell.exe, arguments = -NonInteractive -File 'C:\path\script.ps1'.

References

1Microsoft Learn - PowerShell scripting overviewlearn.microsoft.com
2Microsoft Learn - About Execution Policieslearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.EXEWindows Executable (Portable Executable)
5.JSONJavaScript Object Notation file
6.TAGDataFlex Query Tag Name File
7.ICSiCalendar data file
8.M4AMPEG-4 Audio File
9.DATProgram Data File (generic)
10.JPGJPEG Image

Related extensions

.APKAndroid Package
.EXEWindows Executable (Portable Executable)
.VBSVBScript file (Visual Basic Script)
.JARJava Archive
.EX4MetaTrader 4 Compiled Program (Expert Advisor / Indicator / Script)
.APPXMicrosoft Windows App Package (AppX)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z