What PowerShell Version Runs on My Computer?

Unlike most other tools, PowerShell does not offer us a -version flag to tell us its version number. There is a -Version flag (with a capital V), but that we need to use a specific version of PowerShell. What can we do to find out what version we run?

We can open a PowerShell terminal and type $PSVersionTable:

$PSVersionTable

Name                           Value
---- -----
PSVersion                      5.1.19041.3930
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.3930
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

This shows us detailed table full of version information about all aspects of PowerShell. In my case, I have version 5.1 running on my machine.