Sms_g_system_workstation_status.resourceidĭatediff(dd, sms_g_system_workstation_status.lasthardwarescan, Getdate()) > 90) This second query is looking for all computers that have the ConfigMgr client installed BUT have not reported hardware inventory to ConfigMgr in 90 days. This first query is looking for all computers that were discovered by ConfigMgr using any of the discovery methods, but these computers do not have the ConfigMgr client installed. Let’s get starting by looking at the two queries. In this example WQL Query 1 involves creating a collection for all computers without the ConfigMgr client installed, and WQL Query 2 involves creating a collection for all computers that haven’t had contact with the ConfigMgr server in 90 days. This blog post will talk about your options when it comes to combining two WQL queries. It takes time, patience, and practice in order to know what queries to combine and to confirm that the results from a WQL query are correct. In the simplest terms, WQL is NOT SQL and not everything you can do in SQL will work with WQL.
It is possible to combine two WQL queries into one, but it all depends on what both queries are looking for.
In a recent forum post someone asked for help with combining two WQL queries (see below WQL Query 1 and WQL Query 2) into one query. Combining Two WQL Queries in One Collection