Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

Exporting from Active Directory

I need to provide the names of employees listed in our "everyone" distribution group in Active Directory.  Is there a way to export these names to a csv or excel file?
0
monicamd
Asked:
monicamd
  • 5
  • 2
1 Solution
 
LauraEHunterMVPCommented:
Assuming that the samAccountName of the group is 'All-Users', run the following from the command-line:

dsquery group -samid Everyone | dsget group -member > members.txt
0
 
monicamdAuthor Commented:
When I type in that command, its says '-member' is an unknown parameter.  When I changed it to -members, it says 'target object for this command' is missing.
0
 
LauraEHunterMVPCommented:
Apologies for the typo, it is -members - the latter error likely means that you have entered an incorrect samaccountname.  Run only the dsquery portion of the statement (the part before the '|') and see if it returns successfully.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
monicamdAuthor Commented:
when I just run dsquery group -samid Everyone, nothing happens.  How do I find the samaccountname?
0
 
l84workCommented:
That's because "everyone" is not an AD group.  Just like the "authenticated users", it's a placeholder.  dsquery can't see it.

Are you trying to export all of the users in domain?  just replace "everyone" with "Domain Users".

Or are you talking about exporting the GAL from exchange?  That should the same as 'everyone'.
http://support.microsoft.com/kb/149447/en-us
0
 
monicamdAuthor Commented:
Actually "everyone" is a distribution list/group in AD that contains about 200 members - most of our domain users, but not everyone.  Is there a way to export the members of a distribution list/group?
0
 
monicamdAuthor Commented:
None of these solutions worked and the problem is no longer relevant.  Please close this question.

Thank youj.
0
 
monicamdAuthor Commented:
This didn't work.  It's not longer relevant to me.
0

Featured Post

Problems using Powershell and Active Directory?

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

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now