Link to home
Start Free TrialLog in
Avatar of ubsoc
ubsocFlag for United States of America

asked on

AD "Saved Query" help

I need to make a query in AD (Saved Query) to search an attribute (ipPhone) and find anyone who doesn't have this value set. I tried this but it doesn't work.
(&ipPhone=<NULL>)
(&ipPhone=<>)

However this one does work
(&ipPhone=STAFF)

I know the basic syntax is right but what do I put in if the expected value is blank?
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Try

!ipphone=*

! = not

I'll test in a bit

Thanks

Mike
ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ubsoc

ASKER

ipPhone=* works as it reports back a huge list
However !ipPhone=* does not report anything

I know there are a couple users with that value empty.
Avatar of ubsoc

ASKER

OK, so I used your complete verbage of (objectcategory=person)(objectclass=user)(!ipPhone=*) and that works!
just using (!ipPhone=*) does not work and that is what I was trying.

Thanks for the help
If you did it like this (in ADUC) it would work

(!(ipphone=*))

...that would give you everything though

(&(objectcategory=person)(objectclass=user)(!(ipphone=*)))

for just users (see screenshot)

Thanks

Mike
ipphone2.png
glad to help out