Solved

Searching using Custom Attributes in AD

Posted on 2011-09-22
6
869 Views
Last Modified: 2012-05-12
Hi

We are running Exchange 2007/ 2010 and AD 2003.

On our mailboxes and Distribution Groups, we use Custom Attributes to mark which Cost Center the object belongs to for billing purposes. For the sake of this example, the extension attribute 1 marks the Cost Center (Marketing, Corporate, etc).

I need to pull:

1. A list of all mailboxes belonging to Marketing

2. A list of all Distribution Lists belonging to Marketing

3. A list of all mailboxes with the name SMITH belonging to Marketing

4. A list of all DL's containing the word CORPORATE that belong to Marketing

Does anyone know how I can do this, using either the Exchange Management Shell or Quest Powershell?
0
Comment
Question by:neil4933
6 Comments
 
LVL 10

Expert Comment

by:abhijitwaikar
ID: 36584101
0
 
LVL 15

Expert Comment

by:Ian Meredith
ID: 36584150
Here's your starting point....  being able to mass export mailboxes.

http://www.stevieg.org/2010/07/using-the-exchange-2010-sp1-mailbox-export-features-for-mass-exports-to-pst/

Once you have the right command you will be able to insert your filtering string to get the required result.


This should help with your distribution lists

http://www.networksteve.com/exchange/topic.php/Powershell_command_to_list_all_distribution_groups_and_members_o/?TopicId=3657&Posts=11


Here is the breakdown on the command  Get-DistributionGroup

http://technet.microsoft.com/en-us/library/bb124755.aspx

Here is the breakdown on the command New-MailboxExportRequest

http://technet.microsoft.com/en-us/library/ff607299.aspx


Here are the Filtering options for the above commands - Filterable Properties for the -Filter Parameter in Exchange 2007 SP1 and SP2

http://technet.microsoft.com/en-au/library/bb738155(EXCHG.80).aspx


0
 

Author Comment

by:neil4933
ID: 36584186
Thanks both...really I'm looking for a way to search for custom attributes using Quest?

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 27

Expert Comment

by:KenMcF
ID: 36586135
neil4933, you can use the -LDAPFILTER switch with the quest tools.

get-qaduser -LDAPFILTER "(extensionattribute1=VALUE)"

get-qadgroup -LDAPFILTER "(extensionattribute1=VALUE)"

0
 

Author Comment

by:neil4933
ID: 36590138
hi Ken

Ah, thanks...do you know how I'd use that to find the below then?
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 36590368
There are several ways you can get this information. Here is one example that should work and get what you want if I am reading you question right.


1. A list of all mailboxes belonging to Marketing

get-qaduser -ldpafilter "(extensionattribute1=Marketing)"


2. A list of all Distribution Lists belonging to Marketing

get-qadgroup -ldpafilter "(extensionattribute1=Marketing)"

3. A list of all mailboxes with the name SMITH belonging to Marketing

get-qaduser -ldpafilter "(&(sn=Smith)(extensionattribute1=Marketing))"


4. A list of all DL's containing the word CORPORATE that belong to Marketing

get-qadgroup -ldpafilter "(&(name=*corporate*)(extensionattribute1=Marketing))"
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
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…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
how to add IIS SMTP to handle application/Scanner relays into office 365.

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