Filter a List of Windows Server Roles

Hello,

The following bit of relevance is useful for pulling back the server roles that have been abled on a Windows server.
if exists wmi then if (exists True whose (if True then (exists select object “* from Win32_ServerFeature” of wmi) else False)) = True then (string values of selects “name from Win32_ServerFeature” of wmi) else “WMI Class Not Found” else “Not a Windows OS”

I was wondering if there is a method to filet the list. For example, perhaps you are interested in finding servers with the certificate role installed or the print server role installed. Maybe this could be done at the web reports level? Looking for advice and guidance.

Thanks for your time. :smile:

Different class, because I’m sitting at a laptop but

exists string value whose (it = "TelnetClient") of selects "name from Win32_OptionalFeature" of wmi

1 Like