I'm trying to search for a number of AD computer accounts based on their description, but can't seem to get the query right.
"SELECT ADsPath, Description, Name FROM 'LDAP://" & strRootOUDN & strDomainDN & "' WHERE " & "objectClass='computer' AND description <> '" & strSubnet & "'"
Whatever I do to play around with the "AND description" part of the query returns either everything or nothing.
The description field of our computer accounts contain the machines IP address, so I'm looking to return a set of records containing all computers whose description field begins with "192.168.1." (for example).
Does anybody know the correct query syntax for this?