select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ADSiteName = "Edmonton-Site"
If you do have a large query, I've had WMI choke and die due to memory related issues (e.g. pulling information from SMS_R_SYSTEM for 30k+ clients). When you connect to the database, you want to look at the Views for the database which will have comparable information to WMI versus doing 4 SQL joins to get the information you are looking for with the standard databases. If you are using Powershell 3+ and the SCCM server is 2008+, you can also you Get-CIMInstance to get the data as Get-WMIObject is supposed to be deprecated.