October 20th, 2014

PowerTip: Determine PowerShell Version on Your System

Doctor Scripto
Scripter

Summary: Learn how to determine the version of Windows PowerShell installed on your system.

Hey, Scripting Guy! Question How can I discover the version of Windows PowerShell that is installed on a particular system?  

Hey, Scripting Guy! Answer Use the $psversiontable built-in variable to get a display such as this:

Name                           Value

—-                           —–

PSVersion                      4.0

WSManStackVersion              3.0

SerializationVersion           1.1.0.1

CLRVersion                     4.0.30319.34014

BuildVersion                   6.3.9600.17090

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}

PSRemotingProtocolVersion      2.2

The first line of the results tells you the current Windows PowerShell version. This variable was introduced with
Windows PowerShell 2.0. If you get nothing back, it’s Windows PowerShell 1.0.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.