Solved

Problem with Active Directory queries

Posted on 2009-06-28
7
613 Views
Last Modified: 2012-05-07
Hi,
I have been struggling with queries in AD users & computers. I have found an easy way to list every user that have OMA enabled (outlook mobile access). But I have disovered that this list is not complete. The string im using is "(objectCategory=user)(msExchOmaAdminWirelessEnable=0)".
msExchOmaAdminWirelessEnable: 0 (is for Wireless enabled users; all the 3 features in the Exchange-Features tab).
I have found a couple of users that have all 3 features in the tab but they still dont appear in the search list. Is there anything wrong with my search string? Please help me out, this is frustrating. Btw, this is an 2003 environment.

Best regards, Alice
0
Comment
Question by:AliceGoodspeed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 5

Expert Comment

by:karstieman
ID: 24734279
The (msExchOmaAdminWirelessEnable=0) part is correct.

Try searching more specific by replacing (objectCategory=user) with (objectCategory=person)(objectClass=user)
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24734475

Your search doesn't account for the default value, all three enabled. If no one has changed that msExchOmaAdminWirelessEnable will not be set.

This is a full set of filters which can be used with that attribute.

All Enabled

(&(objectClass=user)(objectCategory=person)(|(!msExchOmaAdminWirelessEnable=*)(msExchOmaAdminWirelessEnable=0)))

!msExchAdminWirelessEnable captures those where the value is not set. It should return the users you're missing now.

And just in case, these are the rest of the possible filters.

Outlook Mobile Access Only:

(&(objectClass=user)(objectCategory=person)(msExchOmaAdminWirelessEnable=5))

User Initiated Synchronisation Only:

(&(objectClass=user)(objectCategory=person)(msExchOmaAdminWirelessEnable=3))

User Initiated and Up-To-Date Notifications Only:

(&(objectClass=user)(objectCategory=person)(msExchOmaAdminWirelessEnable=2))

Everything Disabled:

(&(objectClass=user)(objectCategory=person)(msExchOmaAdminWirelessEnable=7))

HTH

Chris
0
 

Author Comment

by:AliceGoodspeed
ID: 24735342
Thanks Chris,
I'm almost there. Because now I get everything, even those that dont have an Exchange account aswell. Is there somehow to filter them out with the script?
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 71

Accepted Solution

by:
Chris Dent earned 125 total points
ID: 24735350

Sure, we can use the legacyExchangeDN attribute for that:

(&(objectClass=user)(objectCategory=person)(legacyExchangeDN=*)(|(!msExchOmaAdminWirelessEnable=*)(msExchOmaAdminWirelessEnable=0)))

You might also do the same thing with any of:

mail
homeMDB
proxyAddresses

Chris
0
 

Author Comment

by:AliceGoodspeed
ID: 24735451
I have modified the search and came up with this result.

(&(objectClass=user)(mail=*)(|(!msExchOmaAdminWirelessEnable=*)(msExchOmaAdminWirelessEnable=0)))

IT is working perfect now. Thanks for helping me out Chris,
0
 

Author Comment

by:AliceGoodspeed
ID: 24735467
Chris, whats the difference between my modified and yours. I get 964 accounts while yours gets 977 accounts.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24735506

legacyExchangeDN may be set on a few accounts that no longer really have mailboxes. I wondered if you'd get a discrepancy there.

You could probably find them with:

(&(objectClass=user)(objectCategory=name)(!mail=*)(legacyExchangeDN=*))

All those that have legacyExchangeDN, but not mail attribute set.

Chris
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A hard and fast method for reducing Active Directory Administrators members.
Here's a look at newsworthy articles and community happenings during the last month.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question