Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Determine PowerShell Version

$
0
0

Summary: Easily determine the version of Windows PowerShell that is installed.

Hey, Scripting Guy! Question How can I determine what version of Windows PowerShell is installed on my computer?

Hey, Scripting Guy! Answer Use the $psversiontable automatic variable, which is available in Windows PowerShell 2.0 and Windows PowerShell 3.0. 
          (If nothing comes back, you are running Windows PowerShell 1.0.)

PS C:\> $PSVersionTable

 

Name                           Value

----                           -----

PSVersion                      3.0

WSManStackVersion              3.0

SerializationVersion           1.1.0.1

CLRVersion                     4.0.30319.18046

BuildVersion                   6.2.9200.16434

PSCompatibleVersions           {1.0, 2.0, 3.0}

PSRemotingProtocolVersion      2.2

 

To return only the version, access the PSVersion property:

PS C:\> $PSVersionTable.PSVersion

 

Major  Minor  Build  Revision

-----  -----  -----  --------

3      0      -1     -1


Viewing all articles
Browse latest Browse all 17778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>