PowerTip: How Can I Determine What Version of PowerShell Is Running?


Summary: Learn how to determine the version of Windows PowerShell that is running on your computer.

Hey, Scripting Guy! Question How can I determine the version of Windows PowerShell that is running on my computer?

                        Hey, Scripting Guy! Answer Use the $psversiontable automatic variable. This variable was introduced in Windows PowerShell 2.0. If the variable is unavailable, you have Windows PowerShell 1.0. Otherwise, it reports the correct version. This command and associated output is shown here.

PS C:\> $psversiontable

 

Name                           Value

—-                           —–

PSVersion                      3.0

WSManStackVersion              3.0

SerializationVersion           1.1.0.1

CLRVersion                     4.0.30319.18010

BuildVersion                   6.2.9200.16384

PSCompatibleVersions           {1.0, 2.0, 3.0}

PSRemotingProtocolVersion      2.2

Comments (4)

  1. Anonymous says:

    OK, one more 😉

    $host.version

  2. Anonymous says:

    also, can use $host to show a simple number of version.

  3. Nick Perry says:

    Or even the Get-Host cmdlt

  4. Debarun says:

    Thanks..

Skip to main content