How-to determine PowerShell version

If you need to know which PowerShell version is installed on your machine, use automatic variable $PSVersiontable. Here’s output for same from my machine:

PS C:\Windows\system32> $PSVersionTable

Name Value
---- -----
PSVersion 5.0.10586.494
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.494
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3

If you just need version, use $PSVersionTable.PSVersion:

PS C:\Windows\system32> $PSVersionTable.PSVersion

Major Minor Build Revision
----- ----- ----- --------
5 0 10586 494


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s