Created
February 23, 2019 22:12
-
-
Save realslacker/7b86648afbb893d550e1fdbc81f4a760 to your computer and use it in GitHub Desktop.
WMI Filters
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
# filter for server core | |
$Query = 'SELECT * FROM Win32_OptionalFeature WHERE Caption = "Microsoft-Windows-Server-Gui-Shell-Package-DisplayName" AND InstallState = "2"' | |
Get-WmiObject -Query $Query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment