WINTEL TIPS

AD LDAP QUERIES
I had a requirement where I wanted to find all computers runnin Windows Server operating system. I do not want to list disabled computer accounts and computer removed from AD( and physically )but AD object is still active in AD.
I found this query that gives the exact output and ofcourse you can use "oldcomp" utility from http://www.joeware.net/freetools/tools/oldcmp/index.htm
(&(objectcategory=computer)(pwdLastSet<=129779498574850000)(!userAccountControl:1.2.840.113556.1.4.803:=2)(operatingSystem=Windows Server*))
Avinash Shitole
Comments