Solved

Searching using Custom Attributes in AD

Posted on 2011-09-22
6
862 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
 
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

Join & Write a Comment

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
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.
In this video we show how to create a Distribution Group 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 Recipients >>…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

760 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