Home > windows > dsquery – export AD group members to text

dsquery – export AD group members to text


To export AD group members to text:

dsquery group DC=consoto,DC=com -name groupname | dsget group -members > groupname.txt

*Note: command to be run on DC.

Advertisements
Categories: windows Tags: , ,
  1. I already said it is anonymous...
    August 2, 2011 at 11:04 pm

    Life saver, man !!!! Thanks !!!!

  2. Josh
    August 28, 2012 at 10:18 pm

    Another method…
    dsquery group -samid GroupName | dsget group -members > groupname.txt
    This avoids having to get the DN

  3. May 2, 2014 at 11:51 pm

    Second one worked great! Thanks a lot 🙂

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: