?
Solved

Searching using Custom Attributes in AD

Posted on 2011-09-22
6
Medium Priority
?
879 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
[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
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
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.

 
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 2000 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 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