PowerShell Scripts, Tips, Expert Advices, Forums, and Resources

image rotation

Welcome to PowerShell.com, the educational and community site for Windows PowerShell People. Get a quick overview.

Latest Scripts

11-26-2014 - Exports
11-20-2014 - Are my servers online?
11-11-2014 - scope

Latest Announcements/Events

10-31-2014 - Using PowerShell to download Teched Europe 2014 content
10-15-2014 - Class Dismissed
10-12-2014 - The Case for PowerShell

As a Powershell.com member you will have access to:

  • Daily PowerShell tips written by Microsoft MVPs and other leading Windows PowerShell experts
  • Free Windows PowerShell advice and training provided by Microsoft MVPs and other leading Windows PowerShell experts
  • Access to leading Windows PowerShell blogs
  • A free ebook, Mastering PowerShell, written by Microsoft MVP Dr. Tobias Weltner
PowerTip of the Day

Finding Out Windows Version

All PowerShell Versions

Do you own Windows 8.1 Basic, Pro, or Enterprise? Finding out the Windows version is easy. Finding out the exact subtype is not so trivial.

At best, you may get the SKU number which tells you exactly the Windows version you have, but it’s again not trivial to translate back the number to a meaningful name:

 
PS> Get-WmiObject -Class Win32_OperatingSystem | Select-Object -ExpandProperty OperatingSystemSKU

48  
 

A better way may be this line which returns a clear text description of the license type you are using:

 
PS> Get-WmiObject SoftwareLicensingProduct -Filter 'Name like "Windows%" and LicenseStatus=1' | Select-Object -ExpandProperty Name 

Windows(R), Professional edition
 

Another approach could be this which will include the major Windows version as well:

 
PS> Get-WmiObject -Class Win32_OperatingSystem | Select-Object -ExpandProperty Caption

Microsoft Windows 8.1 Pro  

Twitter This Tip! ReTweet this Tip!

Copyright 2012 PowerShell.com. All rights reserved.