A. A Server Core installation has a specific OperatingSystemSKU, as follows: 13 (Standard Edition Server Core), 14 (Enterprise Edition Server Core), or 12 (Datacenter Edition Server Core). You can therefore use the following query to check via a WMI filter:

select * from Win32_OperatingSystem where OperatingSystemSKU=12 or OperatingSystemSKU=13 or OperatingSystemSKU=14

This figure shows the filter.