I didn’t know about this built-in variable until recently. $PSVersionTable is new with Powershell 2.0. (Thus you can tell if you have v2 installed by seeing if this variable exists.)
It’s a hashtable containing versions of various parts of your system. For example, here’s what I see on my machine:
PS c:\temp> $PSVersionTable
Each value is actually an object of type System.Version.
So, for example, next time Microsoft updates Powershell and you want to see if you have the update, you could type $PSVersionTable.PSVersion to find out.
I won’t use this information every day, but I’ve wanted it a few times, and now I finally know how to get at it.
I haven’t looked into the other values…I’m disappointed that the CLRVersion is showing as 2.0. This was run on a computer with the Framework 4.0 installed and I was hoping to see it.