How to get the Installed Powershell version ?
There are different ways to get the powershell version.
$PSVersionTable.PSVersion
This won't work in powershell 1.0. This command is introduced on powershell 2.0 .
Example:
PS C:\Users\muralidharand> $PSVersionTable.PSVersion
This command results the below output.
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
Get-Host | Select-Object Version
Example:
PS C:\Users\muralidharand> Get-Host | Select-Object Version
This command results the below output.
Version
-------
2.0
No comments:
Post a Comment