Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Searching using Custom Attributes in AD

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

 
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

Are your AD admin tools letting you down?

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

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

610 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