Wednesday, March 12, 2014

How to identify Powershell Version

Below are the various ways to identify the powershell version

Start - Run - Powershell

PS > get-host

<output>
Name             : ConsoleHost
Version          : 3.0
'
'
PS > $psversiontable

Name                           Value
----                           -----
WSManStackVersion              3.0

PS C:\> $host.version
Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1

PS C:\> $psversiontable.psversion
Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1

PS C:\> host

Name             : ConsoleHost
Version          : 3.0
PS C:\> get-host | select-object Version
Version
-------
3.0

No comments: