Solved

Problem with Active Directory queries

Posted on 2009-06-28
7
600 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
  • 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 70

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 70

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 70

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now