Created
March 25, 2021 09:35
-
-
Save PartTimeLegend/b8d316e6b83a93a9a254ea8f32a68d4b to your computer and use it in GitHub Desktop.
Find Windows Edition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| switch ((Get-WmiObject -class Win32_OperatingSystem).Caption) | |
| { | |
| {$_.Contains("Home")} { Write-Output "Home" } | |
| {$_.Contains("Business")} { Write-Output "Business" } | |
| {$_.Contains("Enterprise")} { Write-Output "Enterprise" } | |
| Default { "Unknown" } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment