Solved

2003 AD Query

Posted on 2011-09-12
11
296 Views
Last Modified: 2012-05-12
I'm trying to create a query on 2003 SBS server to grab the following. I would like an export of each user, user name, email addresses

I can't find any predefinded queries to accomplish this. Please advise on how i could get that information.

Thanks
0
Comment
Question by:webiis
[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
  • 5
  • 5
11 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 36524637
The following will work using the build in DS series of tools.
dsquery user -samid * -limit 0 | dsget user -ln -fn -samid -email >c:\users.txt
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 36524653
And a second method using the Quest powershell cmdlets.

get-qaduser | select-object firstname,lastname,email,samaccountname | export-csv c:\users.csv
0
 

Author Comment

by:webiis
ID: 36524882
This is pretty close. I need username, all email addresses associated with that user, primary email address, full name.  I'm moving from 2003 sbs to 2010 exchange and going to do everything fresh. I'm looking for a way to streamline the process to of creating the users on the exchange 2010 server.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 36525003
Ok this might make it a little bit messy because all of the email addresses are stored in an array called proxyaddresses. Give below a shot and let me know.

get-qaduser | select-object firstname,lastname,email,samaccountname,proxyaddresses | export-csv c:\users.csv
0
 

Author Comment

by:webiis
ID: 36525019
The source server is exchange 2003 SBS, so the query failed.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 36525046
I dont think that should cause a problem with the script.

Try this and let me know if it works.

get-qaduser {username} | select-object proxyaddresses

0
 

Author Comment

by:webiis
ID: 36525093

C:\>get-qaduser {username} | select-object proxyaddresses
'get-qaduser' is not recognized as an internal or external command,
operable program or batch file.

C:\>
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 36525138
Oh ok you just need to install the quest cmdlets on your workstation.
http://www.quest.com/powershell/activeroles-server.aspx

These dont need to be installed on the server just your management workstation.
0
 

Author Comment

by:webiis
ID: 36525143
well i only have RDP access to the server. Is there any harm in installing this on the server?
0
 
LVL 5

Expert Comment

by:neothwin
ID: 36546594
csvde -f ourput.csv -r "(proxyaddresses=*)" -l Displayname,proxyaddresses,mail,sn,givenname

To filter only users with mailbox (excluding groups and contacts),
csvde -f ourput.csv -r "((Homemdb=*)" -l Displayname,proxyaddresses,mail,sn,givenname
0
 

Author Closing Comment

by:webiis
ID: 36547244
your query worked. you saved me a lot of time. Thanks.
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange Server not available 42 66
Exchange 2010 Global Calendar Permissions 2 53
Exchange 2016 - Archiving and Retention Policies 1 52
2007 Exchange Server Failed Update 3 22
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
In this video we show how to create a Contact 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 >> Contact ta…
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…

734 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