PowerShell: Get Windows Edition
Need to check which edition of Windows is installed - Home, Pro, Enterprise - for licensing checks or feature compatibility confirmation? This one-liner pulls it straight from the system.
Prerequisites:
- Privileges: None
- Module: Built-in, no import needed
Quick Command:
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Caption
Example Output:
Caption
-------
Microsoft Windows 11 Pro
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.
How It Works:
- Get-CimInstance -ClassName Win32_OperatingSystem queries the operating system class, same one used for build number, install date, and architecture in earlier articles.
- Caption returns the full, human-readable OS name including its edition - unlike Version (which only gives a numeric version string), Caption directly states whether it's Home, Pro, Enterprise, or Education.