Find groups in a list that a user is a member of

Excel can be useful for creating quick and dirty “loops” where you’ve already got a data set list. For example, to find groups from a list that a given user is a member of stick the groups in column A and this formula in column B and drag down:

=CONCATENATE("@dsquery group -name ", A1, " | dsget group -members |
  findstr /i /p /c:<username>")

Does the job.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>