3 Replies Latest reply on Jul 28, 2015 5:13 AM by dalsmith

    How to filter out OU groups?

    Apprentice

      We have tried to filter out computers via OU groups but when I add an OU group to exclude the query will not filter it off?

       

      How can I query OU groups and filter them out of a search?

       

      Thanks guys!

        • 1. Re: How to filter out OU groups?
          Apprentice

          FYI... we have used the <> and the NOT LIKE statements,

          • 2. Re: How to filter out OU groups?
            Apprentice

            I had the exact same problem!  I'm was using Queries to define target computers for a software distribution task and I wanted to filter out some OU's.  I had a long list, but as example, I wanted to exclude OU "BabyAssistedBreathing" and OU "ProctologyExamScopes" because I sure don't want those to reboot or have an "oopsies" accidental service disruption.

             

            In the query it looked like this:

             

            AND ("Computer"."LDAP Location"  Not Like  "BabyAssistedBreathing"

            AND "Computer"."LDAP Location"  Not Like  "ProctologyExamScopes")

             

            I had used an OR between the  "Computer"."LDAP Location" before and it just wasn't logical.  Won't work right with the OR.  Since a vulcan wasn't around, it took me a while to figure out what was going wrong.

            • 3. Re: How to filter out OU groups?
              Apprentice

              Thanks benjones.  This has saved me much time in my work efforts.