Sunday, April 24, 2011

WMI Class for Windows Operating Systems

in a command window (cmd) type wmic OS get OperatingSystemSKU --- to check operating system version

Note: Windows Server 2003 and lesser version - this property is not available.

The number that is returned corresponds with Microsoft's list of SKU numbers for Windows Server:
  • 0- Undefined
  • 1- Ultimate Edition
  • 2 -Home Basic Edition
  • 3- Home Premium Edition
  • 4- Enterprise Edition
  • 5 -Home Basic N Edition
  • 6- Business Edition
  • 7 -Standard Server Edition
  • 8- Datacenter Server Edition
  • 9- Small Business Server Edition
  • 10 -Enterprise Server Edition
  • 11- Starter Edition
  • 12- Datacenter Server Core Edition
  • 13- Standard Server Core Edition
  • 14 -Enterprise Server Core Edition
  • 15- Enterprise Server Edition for Itanium-Based Systems
  • 16- Business N Edition
  • 17- Web Server Edition
  • 18 -Cluster Server Edition
  • 19- Home Server Edition
  • 20- Storage Express Server Edition
  • 21- Storage Standard Server Edition
  • 22 -Storage Workgroup Server Edition
  • 23- Storage Enterprise Server Edition
  • 24- Server For Small Business Edition
  • 25- Small Business Server Premium Edition
wmic OS get OSArchitecture ---- to check operating system architecture
wmic os get Name ---Operating System Name
wmic os get BootDevice, BuildNumber, BuildType, Version
wmic os get ServicePackMajorVersion, ServicePackMinorVersion

Other useful properties are below which you can use with wmic OS get property-name
  1. CurrentTimeZone
  2. FreePhysicalMemory
  3. FreeSpaceInPagingFiles
  4. FreeVirtualMemory
  5. InstallDate
  6. LastBootUpTime
  7. LocalDateTime
  8. Locale
  9. Manufacturer
  10. MaxNumberOfProcesses
  11. MaxProcessMemorySize
  12. NumberOfLicensedUsers
  13. NumberOfProcesses
  14. NumberOfUsers
  15. OSLanguage
  16. OSProductSuite
  17. OSType
  18. OtherTypeDescription
  19. ProductType
  20. RegisteredUser
  21. SerialNumber
  22. ServicePackMajorVersion
  23. ServicePackMinorVersion
  24. SizeStoredInPagingFiles
  25. Status
  26. SystemDevice
  27. SystemDirectory
  28. SystemDrive
  29. TotalSwapSpaceSize
  30. TotalVirtualMemorySize
  31. TotalVisibleMemorySize
  32. WindowsDirectory

No comments:

Post a Comment