Thursday, July 24, 2014

LDAP Queries - Filtering Computer Accounts Service Pack Level


When managing a large environment, it can be sometimes difficult to get all your machines up-to-date.
If you don't have the right tools to get the job done, due to financial restrictions for example you may use some quick and easy ways to get some information you need about how's your environment.

In this case, I'll show how to get the a Microsoft Windows operating system service pack level.
Besides the importance of being up-to-date, if you have some kind of Microsoft Enterprise/Premier support, it's really important to level up your service pack to a supported level.
For example, Microsoft Windows 7 RTM (without any SP) support ended on April 9, 2013.

To get the information, there's a really simple way to do it if the target machines are domain joined.

So, here are the steps:
  1. Open the "Active Directory Users and Computers" mmc
  2. Then, go to "View" -> "Filter Options"
  3. Select "Create custom filter:" and click on "Customize"
  4. Click the "Advanced" tab
  5. Copy and paste one of the queries below depending on what your looking for and click "OK"
  6. Now your mmc will only show computer account that match your query

Queries


Windows XP without any service pack installed
(&(operatingSystem=Windows XP Professional)(!operatingSystemServicePack=*)))
 
Windows XP with service pack 1 installed
(&(operatingSystem=Windows XP*l)(operatingSystemServicePack=Service Pack 1)))

Windows XP with service pack 2 installed
(&(objectCategory=computer)(operatingSystem=Windows XP Professional)(operatingSystemServicePack=Service Pack 2))


Windows 7 without any service pack installed
(&(objectCategory=computer)(operatingSystem=Windows 7*)(!operatingSystemServicePack=Service Pack 1))

Windows 7 with service pack 1 installed
(&(objectCategory=computer)(operatingSystem=Windows 7*)(operatingSystemServicePack=Service Pack 1))

No comments:

Post a Comment