How to Determine installed PowerShell Version

There are multiple approaches to check what version of PowerShell is installed on the machine. Two of the best approaches are listed below.

  1. $PSVersionTable
  2. Get-Host

How to Determine installed PowerShell Version?

If the PowerShell version 2.0, 3.0, 4.0 or 5.0 and above is installed in the machine then Get-Host will run properly and below is the result which it provides when you run Get-Host.

The instance ID from machine to machine will be different and Get-Host will not return the proper result if you are running the command via remote PowerShell session.

$PSVersionTable is the best command to run and it will produce the following results when you run on machines with PowerShell 2.0, 3.0, 4.0 and 5.x installed.

Alternatively, if you need just need only the Major and Minor version details then you could use the command $PSVersionTable.PSVersion. This will return you the following output in the console.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.