Getting the Powershell version

You can get powershell version using the following command:


PS C:\> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

You can use the toString() method to get the version in string format:

PS C:\> $PSVersionTable.PSVersion.toString()
2.0

 

Author: Dev

Full Stack Developer at one of the largest Banks in Canada.