In "Saved Queries" we can create a query (Fig. 1) to find equipment for Operating System and Service Pack.
Before the consultation we enter some data (Fig 2):
Fig 2 Name: Name of the consultation
Description: Detail Description
query Query Root: From where we want to query: could be the whole domain, or OU OU tree. Define
Query: Allows you enter the query.
will select "Custom Search" and on the Advanced tab we enter the LDAP query (Fig 3)
(& (objectCategory = computer) (objectClass = computer) (OperatingSystem = Windows \\ 20XP *) (operatingSystemServicePack = Service Pack 3))
Fig 4
The result gives us computers are Windows XP and SP3 (Fig 4). Slightly modify the query allows us to make other queries.
To search for an operating system, we must modify the part where it says "OperatingSystem" to search for Windows Vista should replace "XP" to "Vista"
To find a service pack, change where it says "operatingSystemServicePack." Changing the "3" by another number.
The * after XP refers to search regardless of the editing system. If we add a! before the field name refers not to seek the specified value. Examples
To search for Windows Vista with SP1
(& (objectCategory = computer) (objectClass = computer) (OperatingSystem = Windows \\ 20Vista *) (operatingSystemServicePack = Service Pack 1))
To search for Windows XP with SP1 and SP2 (ie, with no SP3)
(& (objectCategory = computer) (objectClass = computer) (OperatingSystem = Windows \\ 20XP *) (! operatingSystemServicePack = Service Pack 3))
thing about this type of consultation is that they are static, the result is updated with the push F5. With the last example we all computers with Windows XP with SP3, as they keep the equipment, the list will be emptied.
To learn more ... Saved Queries in Windows Server 2003 using
Using ADUC saved queries on Technet