Solved

Problem with Active Directory queries

Posted on 2009-06-28
7
608 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

726 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