Solved

AD security groups

Posted on 2012-04-11
7
355 Views
Last Modified: 2012-06-04
Hi can anyone tell me if theres a way to export the users from a Active Directory Security group to maybe like an Excel spreadsheet? I need to see how many users are in a group. Thanks
0
Comment
Question by:Thomas N
7 Comments
 
LVL 29

Expert Comment

by:Rich Weissler
ID: 37833741
Sure.  Hopefully you'll have access to the csvde command:

csvde -f groupmem.csv -r "(sAMAccountName=Groupname)" -l member 

Open in new window


That'll put it in a csv file, which can easily be imported into Excel.

A second option would be to use Powershell...
0
 
LVL 1

Expert Comment

by:Tosiisoa
ID: 37833755
If you have 2008 you can export users to .csv or .txt file ADUC. (Active directory users and computers)
Just open the group you want and choose Action -> Export list...

I'm not sure if you can do this in 2003. Then you can use csvde or ldifde.
 
http://www.computerperformance.co.uk/Logon/Logon_CSVDE_Export.htm
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37833758
in powershell

Get-ADGroupMember "Group Name" | Get-ADUser | Select-Object Name, mail | Export-Csv -Path "C:\group.csv" -NoTypeInformation
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
ID: 37833759
You can use a tool like csvde to export   http://www.computerperformance.co.uk/Logon/Logon_CSVDE_Export.htm

I also like a third party tool (free) called adfind from MVP Joe Richards

http://www.joeware.net/freetools/tools/adfind/index.htm

Joe has some nice shortcuts

adfind -sc g:"group name" member

just want the count

adfind -sc g:"group name" member -list | adfind -c


adfind
Powershell is another good way to get this info

Thanks

Mike
0
 
LVL 6

Expert Comment

by:-tjs
ID: 37834031
Here's another nifty command built into Windows (any domain member should have this) that will list members directly in your group and also members implicitly part of your group through nested groups:

dsquery group -name "My Group Name Goes Here" | dsget group -members -expand
0
 
LVL 17

Expert Comment

by:Tony Massa
ID: 37834529
ADFind is awesome, so I'll always suggest it for stuff like this.  To expand on mkline71's post, the new version of ADFIND allows you to count the number of multivalued attributes now.  
Added -cv switch which will count values on multivalue attributes. I find this is useful for working out how many group members there are etc in a given very large group.
Hooray Joe Richards!  You're the best.
0
 

Author Comment

by:Thomas N
ID: 37952684
thanks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

914 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now