How do I find which Windows version I'm using?
I'm using PowerShell 2.0 and tried:
PS C:\> ver
The term 'ver' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify tha
t the path is correct and try again.
At line:1 char:4
+ ver <<<<
+ CategoryInfo : ObjectNotFound: (ver:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How do I do this?
Best Answer
Since you have access to the .NET library, you could access the
OSVersion
property of theSystem.Environment
class to get this information. For the version number, there is theVersion
property.For example,
Details of Windows versions can be found here.