export my user accounts to a spreadsheet

WellingtonIS
WellingtonIS used Ask the Experts™
on
Is there any way I can export my users to a spreadsheet from Active Directory.  I know you can go to the individual OU's and click export but then I have to put it all together in a spreadsheet.  I have a query for enabled users which lists all my users.  I was wondering if I can somehow export that to a file?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gary DewrellSenior Network Administrator

Commented:
Sure can. You can use powershell to do it.  Lot of options so I am going to give you a link.

http://stackoverflow.com/questions/4381943/how-to-export-csv-of-active-directory-objects

Author

Commented:
OK the only thing is all my users have a wrm in front of there name.  So somewhere I have to note that.

Author

Commented:
the error I'm getting is Get-ADuser not name of a cmdlet...
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Gary DewrellSenior Network Administrator

Commented:
ARe you doing this from the DC?  What version of OS is your DC?

To do this remotely you  have to have the Active Directory cmdlets installed. See this article for how to setup your PC for remote AD management.
http://technet.microsoft.com/en-us/magazine/gg413289.aspx

 or you can also download QADTools from Quest. (Free and has a lof of extra commandlets)

Author

Commented:
I have no access to the DC only AD tools.
Gary DewrellSenior Network Administrator

Commented:
If the DC is 2008 R2 then you can remotely do it via powershell. Follow the article I posted above.
Senior Solutions Architect
Commented:
You've got access to AD tools?
Then use CSVDE or LDIFDE.

Instructions can be found here:
http://ss64.com/nt/csvde.html

A nice AD tool is Hyena:
http://www.systemtools.com/hyena/

Otherwise look at dsquery and dsget commands.

Author

Commented:
thanks  DSQuery did the trick.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial