0

I want a WMI filter for all computers except server core for a GPO deploying some GUI tools.

The top result for "wmi query server core" has many issues:

  • The answers are specific for Server 2012. The name of the server core feature keeps changing in upcoming versions
  • In some newer editions, the server core option cannot be installed/removed, so no entry in Win32_OptionalFeature leading to a false negative
  • I want the tool deployed to workstations as well, which wouldn't have server core as an optional feature. However, one can't query two tables in WMI so need to come up with a way to do "not server core OR desktop"
billc.cn
  • 444
  • 5
  • 12

1 Answers1

1

Found a hack myself. Query if explorer.exe exists instead:

Select * from CIM_DataFile where Name ='C:\\Windows\\explorer.exe'
billc.cn
  • 444
  • 5
  • 12