October 22, 2010

PowerShell - Which version of Windows are we running on?

In PowerShell, how can you find out which version of Windows are we running on?

Solution:

Start a PowerShell window and type Get-WMIObject Win32_OperatingSystem

Output should say something like:

SystemDirectory : C:\Windows\system32
Organization    : XXXXXXXXXXXXXXXXXXXX
BuildNumber     : 7600
RegisteredUser  : XXXXXXXXXXXXXXXXXXXX
SerialNumber    : XXXXX-XXX-XXXXXXX-XXXXX
Version         : 6.1.7600

Entry categories: Programming
Posted by Jorgen Thelin at October 22, 2010 09:54 AM - [PermaLink]