How To Display A List Of Names Of Users In A Group

IT Support Forum Forums Active Directory Users And Computers How To Display A List Of Names Of Users In A Group

Tagged: ,

This topic contains 0 replies, has 1 voice, and was last updated by  Webmaster 1 year, 5 months ago.

  • Author
    Posts
  • #1188

    Webmaster
    Keymaster

    Using the command prompt from a domain connected computer with the RSAT tools installed, you can get a list of users in a group (showing display names) using dsQuery and dsGet. Here’s how to get a list of users in a group:

    In the command prompt, type:

    dsquery group -name “Insert Group Name Here” | dsget group -members | dsget user -display

    This uses dsQuery to get the group name in a format that can be piped into the dsGet to get a list of members in the group, which is then piped into the command to list the users by display name.

    ❗ If there are more than 2,000 members in the group you want to list the users of, add “-limit 9999999”, (without quotes) to the end of the command.

    If you want this in a text file, simply add “>> C:\Temp\Txtfile.tx”, (without quotes) to the end of the command. Make sure you have permission to write to the location 😉

You must be logged in to reply to this topic.