Active Directory

Posted on 2012-08-27
Last Modified: 2012-08-27
Domain is Windows 2008 R2 Enterprise   SP1 server

Is there an "easy" way to list the groups and the members in that group

Question by:bankwest
    LVL 27

    Expert Comment

    since you are running 2008R2

    use powershell

    import-module activedirectory
    get-adgroupmember GROUPNAME
    LVL 57

    Accepted Solution

    Are you looking fora  way to dump every group and members of those groups.

    In addition to Ken's powershell you can use adfind (free).  If you are looking for a nice free GUI tool try adinfo

    You can select "All Groups" and export members.



    Author Comment

    I see that can give me a list, group by group.  

    Is there a command to list all my groups and all the members in those groups and possibly export to a csv file

    I am new to this so appreciate the help

    Author Closing Comment

    EXCELLENT....EXACTLY what I was needing
    LVL 27

    Expert Comment

    try this

    get-adgroup | Foreach {
    $groupname = $_.Name
    Get-adgroupmember $GroupName |
      Select Samaccountname |
        Export-csv C:\Temp\$GroupName.csv -notype

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I know all systems administrator at some time or another has had to create a script to copy file from a server share to a desktop. Well now there is an easy way to do this in Group Policy. Using Group policy preferences is not hard. The first thing …
    To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
    This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
    This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

    733 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

    18 Experts available now in Live!

    Get 1:1 Help Now