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

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

  • Comments 3
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • also, can use $host to show a simple number of version.

  • Or even the Get-Host cmdlt

  • OK, one more ;)

    $host.version