Check the Powershell Version: PowerShell Commands & Registry Editions
Check the Powershell Version: PowerShell Commands & Registry Editions
It's easy to find out which version of PowerShell you are using on Windows 10 and 11. You can check the version by running simple commands, using the registry, or by signing in remotely. This wikiHow article will show you how to check your PowerShell version and teach you how to upgrade PowerShell to the latest version.
Quick Steps

Using a PowerShell Command

Open PowerShell. There are multiple ways that you can run PowerShell: Press the Win key and search for PowerShell, and then click the system result. Press Win + X to open a menu and click PowerShell. However, you can change "PowerShell" here to "Command Prompt," so this method may not work for you. This is the easiest and fastest method to find your PowerShell version.

Type $PSVersionTable into PowerShell and press ↵ Enter. Pressing Enter sends the command.

Look for your PowerShell version number. It's next to "PSVersion". Version 5.1 is the last supported Microsoft version, so that's most likely what your updated computer has. You can also use the commands get-host and $host.version, but those are less likely to give accurate answers. Use the $PSVersionTable command for the best results.

Using the Registry

Open Registry Editor. Press the Win key, type regedit, and click the app result.

Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft. You can enter that into the address bar or navigate the different folders.

Check your version of PowerShell. Look for subfolders that indicate your version of PowerShell. For example, PowerShell 5 is in PowerShell\3\PowerShellEngine. PowerShell 7 is in PowerShellCore\InstalledVersions\31ab5147-9a97-4452-8443-d9709f0516e1.

Logging In Remotely

Run winrm quickconfig on the remote computer as an Administrator. You need to do this so the computer will let you use PowerShell remotely. You will only be able to use this method if Windows Management Framework is running.

Type the following command and press ↵ Enter: Invoke-Command -ComputerName TESTCOMPUTERNAME -ScriptBlock {$PSVersionTable.PSVersion} -Credential $cred. Substitute the name of the computer where you see "TESTCOMPUTERNAME."

Look for the PowerShell version number. It's next to "PSVersion".

How to Upgrade PowerShell

To upgrade PowerShell, you'll need to update Windows. By updating Windows, you'll also update your PowerShell version if you have an out-of-date one. This method will not update you to PowerShell 7. To get that version, you can find it in Github where you can download the version for your OS.

What's your reaction?

Comments

https://sharpss.com/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!