SYMPTOMS
When Windows Management Instrumentation (WMI) populates Win32_Group instances on Microsoft Windows NT 4.0, WMI uses the "BUILTIN" string for the domain property. When you are using WMI to enumerate local groups on a Windows NT 4.0-based computer, you may use a WQL query that is similar to the following query:
Select * from Win32_Group where Domain="BUILTIN"
However, on Microsoft Windows 2000 and later, WMI uses the machine name to populate the same domain property, so the query may be similar to the following WQL query:
Select * from Win32_Group where Domain ="MyMachineName"
A problem occurs with WMI when you try to use the following query that ordinarily returns the appropriate result set on any of the previously mentioned operating systems:
Select * from Win32_Group where Domain="BUILTIN" OR Domain ="MyMachineName"
Because of a bug in WMI, this query returns duplicates of each instance in the result set.