.ps1 · text/plain
What is a .ps1 file?
PowerShell Script
About the format
A .ps1 file is a PowerShell script — text commands for Windows' modern automation shell, which can do essentially anything on the system: manage services and scheduled tasks, edit the registry, call Windows APIs, download and run code. Unlike .bat files, double-clicking a .ps1 does NOT run it — it opens in Notepad, a deliberate safety default backed by execution policy (which blocks unsigned scripts in most configurations until a user or admin loosens it). That makes casual double-click infection rare; instead, malicious PowerShell almost always arrives launched by something else — a shortcut, a macro, a .bat wrapper — often as an encoded one-liner (powershell -enc <base64>) precisely so there's no readable .ps1 on disk. For scripts you receive legitimately: read them (they're text), be suspicious of Invoke-Expression on downloaded strings and of long base64 blobs, and run them from an elevated PowerShell only when you understand what they change.
How to open a .ps1 file
Windows
- PowerShell / PowerShell 7 (run deliberately)
- VS Code or Notepad (read it)
- PowerShell ISE
macOS
- PowerShell 7 (cross-platform)
Linux
- PowerShell 7 (cross-platform)
Is a .ps1 file dangerous?
Yes when executed — full system automation. The double-click default (opens in Notepad) is your friend; keep it.
Related file types
Not sure what a file is? Check its bytes.
File names lie; magic numbers don't. Drop any file into the identifier — nothing is uploaded.
Identify a file →