For all Workgroup Windows Servers and workstation I used this queries below, the key thing is I queried the variable found in the resource Explorer Domain Role and Operating system Name & version %server% or %Workstation%. The domain Role attribute class value classifies the status of the devices there are 5 classes please see list below. Computer System
Excellent blog by Eirik Holgernes Find all Collections with Auto Incremental update in ConfigMgr 2012