<p>There are a couple of questions similar to this on stack overflow but not quite the same.</p>

<p>I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts.  I also want to check whether a user is already a member so that I don't add the same account twice, and presumably get an exception.</p>

<p>So far I started using the DirectoryEntry object with the <code>WinNT://</code> provider.  This is going ok but I'm stuck on how to get a list of members of a group?</p>

<p>Anyone know how to do this?  Or provide a better solution than using DirectoryEntry?</p>

You should be able to find this information inside the
```
"member"
```
attribute
on the
```
DirectoryEntry
```
that represents the group.