Active Directory “computer name contains” search string


You just have to love the simple things in this world that are not so obvious at first thought…

In AD if you try to search for computer name and would like to be slightly more specific you have a problem. Here is the default choice:

The rather obvious choice would include “computer name contains” but sadly the option is not there! Solution? Simple – use LDAP search string instead! In ADUC define new query with custom search for:


where 0112 is what you’re looking for (or computer name contains)

6 thoughts on “Active Directory “computer name contains” search string

  1. Support Add

    Icon: find objects in Active Directory Domain Services

    > Change Find Dropdown-List from “Users, Contacts and Groups” to “Custom Search”
    > Go to Advanced Tab
    > Enter LDAP guery

  2. Adrian Kielbowicz Post author

    Thomas, please add (!userAccountControl:1.2.840.113556.1.4.803:=2) in your string to filter out disabled accounts. This should read as follows:


  3. Joe Jett

    Hello Adrian
    I’m trying to use your formula to search the Computer Description field for the word Asus. Shouldn’t this work:
    I get a blank when I execute it and I know there are Computers with Asus in the Description. Here is one: NERI – Grandview Maint Lunchroom Win7-64 Asus

Leave a Reply