3

After installing powershell, i tried running PSVersionTable.PSVersion and PSVersionTable to check the version, however i get the following error: enter image description here

I did install WMF-4.0 and the .NET framework versions before installing WMF-v5

Most posts point me to make sure i have .NET and WMF-4.0 installed and i cant seem to find anything else.

Note I am Using windows 7

BlooB
  • 955
  • 10
  • 23
  • 3
    `$PSVersionTable.psversion` or `$PSVersionTable.psversion.major` for getting directly to the version – Ranadip Dutta Jun 20 '17 at 05:31
  • 2
    Possible duplicate of [Determine installed PowerShell version](https://stackoverflow.com/questions/1825585/determine-installed-powershell-version) – G42 Jun 20 '17 at 08:48

2 Answers2

6

You need to enter $PsVersionTable. It is a built in variable and you access variables via $.

Mark Wragg
  • 22,105
  • 7
  • 39
  • 68
4

The correct way to get the version is $PSVersionTable. It's a variable, not a call to anything.

SomeShinyObject
  • 7,581
  • 6
  • 39
  • 59