Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (DirectoryEntry machine = new DirectoryEntry("WinNT://" + serverName))
- {
- //get local admin group
- using (DirectoryEntry group = machine.Children.Find("Administrators", "Group"))
- {
- //get all members of local admin group
- var members = (IEnumerable)group.Invoke("Members", null);
Add Comment
Please, Sign In to add comment