Check your PowerShell version from the command line
The fastest way to see which PowerShell version you're running is to open PowerShell and type a single command. On Windows, press the Windows key, type PowerShell, and click Windows PowerShell or PowerShell (depending on your system). On macOS or Linux, open Terminal and type pwsh if you have PowerShell Core installed.
Once PowerShell is open, type this command and press Enter:
$PSVersionTable.PSVersion
PowerShell will display four numbers: Major, Minor, Build, and Revision. For example, you might see 5.1.19041.1682. The first number (5 or 7) tells you the major version — that's usually what matters when you're checking compatibility or looking up how to do something in your version.
If you want to see more detail about your PowerShell installation in one view, type $PSVersionTable without the version part. This shows you the full table, including the .NET version your PowerShell is running on and the platform (Windows, Linux, or macOS).
Key Takeaways
- Type $PSVersionTable.PSVersion in PowerShell to see your version number instantly.
- The first number in the version (5 or 7) is the major version and determines which features and syntax you can use.
- Windows comes with PowerShell 5.1 by default; PowerShell 7 and later are separate downloads called PowerShell Core.
- If you see an error when you type the command, you may be in Command Prompt instead of PowerShell — close it and open PowerShell specifically.
Understand what the version numbers mean
PowerShell versions break down into major releases that work quite differently from each other. PowerShell 5.1 is the version that ships with Windows 10 and Windows 11 by default. It's built into the operating system and uses the .NET Framework. Most scripts you find online that say "for Windows" are written for version 5.1.
PowerShell 7 and later versions are called PowerShell Core. These are separate downloads that run on Windows, macOS, and Linux. They use .NET Core instead of the .NET Framework, which means some older scripts won't work without changes. If you installed PowerShell yourself rather than using the version that came with Windows, you almost certainly have PowerShell 7 or later.
The minor number (the second digit) and build number (the third digit) matter less often. They represent updates and security patches within a major version. If someone tells you "this works in PowerShell 5" or "you need PowerShell 7," they're talking about the major version. The minor and build numbers usually don't change whether a script will run.
Find your version if PowerShell won't open
If PowerShell won't start or you can't get to the command line, you can check the version through Windows settings. Press Windows key + R, type winver, and press Enter. This opens the About Windows dialog, which shows your Windows version but not your PowerShell version directly. However, you can infer it: Windows 10 and Windows 11 both come with PowerShell 5.1 unless you've installed PowerShell Core separately.
Another route is to check File Explorer. Navigate to C:\Windows\System32\WindowsPowerShell\v1.0 and look for the PowerShell.exe file. Right-click it, select Properties, then click the Details tab. The File Version field shows your PowerShell version. This works only for the built-in version 5.1; if you installed PowerShell 7 or later, it lives in a different folder (usually C:\Program Files\PowerShell) and you'd need to check there instead.
Distinguish between PowerShell and PowerShell ISE
Windows includes two PowerShell tools: PowerShell itself (the command-line interface) and PowerShell ISE (Integrated Scripting Environment), which is a text editor for writing scripts. Both run the same PowerShell engine underneath, so they have the same version. If you open PowerShell ISE and want to check the version, you can still type $PSVersionTable.PSVersion in the console pane at the bottom.
PowerShell ISE only comes with Windows and only runs PowerShell 5.1. If you've installed PowerShell 7 or later, there's no ISE version for it — you'd use Visual Studio Code with the PowerShell extension instead. So if you can only find PowerShell ISE on your computer, you're running version 5.1.
Check version requirements before running a script
When you download a PowerShell script from the internet or from your organization, the script file itself sometimes tells you which version it needs. Open the .ps1 file in a text editor like Notepad. Look at the first few lines for a comment that says something like #requires -Version 5.1 or #requires -Version 7.0. If you see this line and your version is older, the script won't run.
If the script doesn't have a version requirement listed, try running it anyway — it might work on your version. If it fails with an error about a cmdlet or syntax you don't recognize, that's often a sign the script was written for a newer version. Search the error message online along with your PowerShell version to see if others have found a workaround or if you need to upgrade.
Update PowerShell if you need a newer version
If you're running PowerShell 5.1 and need PowerShell 7, you download it separately from Microsoft's GitHub repository. Go to github.com/PowerShell/PowerShell/releases and download the installer for your operating system (Windows, macOS, or Linux). The installer walks you through setup and doesn't remove your existing PowerShell 5.1 — both versions can live on the same computer.
Updates within a major version (like 7.2 to 7.4) usually come through Windows Update if you're on Windows, or through your package manager if you're on macOS or Linux. You don't need to do anything manually most of the time. Check $PSVersionTable.PSVersion occasionally to see if a new build number has appeared.
Frequently Asked Questions
Why do I see two different PowerShell versions on my computer?
You likely have both PowerShell 5.1 (built into Windows) and PowerShell 7 or later (installed separately). They're separate programs that can coexist. When you search for PowerShell in the Start menu, you'll see both listed. Check which one you're in by running $PSVersionTable.PSVersion — it will tell you immediately.
What if the command $PSVersionTable.PSVersion doesn't work?
You're probably in Command Prompt, not PowerShell. They look similar but are different programs. Close the window, press Windows key, type PowerShell (not cmd), and open Windows PowerShell or PowerShell. Then try the command again.
Does my PowerShell version affect which scripts I can run?
Yes. Scripts written for PowerShell 7 often won't run on 5.1 because they use newer cmdlets or syntax. Scripts written for 5.1 usually work fine on 7. If a script fails, check its comments for a version requirement, or search the error message to see if upgrading would help.
Can I have PowerShell 5.1 and PowerShell 7 at the same time?
Yes. Installing PowerShell 7 doesn't remove version 5.1. Both can run independently. You choose which one to open from the Start menu or by typing the command in a terminal.