Solved

Problem with Active Directory queries

Posted on 2009-06-28
7
605 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

791 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