Hi,
How to remove windows group account using C#
I'm using this code to remove user account, but I need to remove the whole group.
DirectoryEntry localDirectory = new DirectoryEntry("WinNT://" + Environment.MachineName.ToString());
DirectoryEntries users = localDirectory.Children;
DirectoryEntry user = users.Find(userDn);
users.Remove(user);
I need to remove the Group with it's users.