Skip to content

Instantly share code, notes, and snippets.

@Dynyx
Created June 4, 2012 13:09
Show Gist options
  • Save Dynyx/2868261 to your computer and use it in GitHub Desktop.
Save Dynyx/2868261 to your computer and use it in GitHub Desktop.
Find local domains
DirectoryEntry root = new DirectoryEntry("WinNT:");
foreach (DirectoryEntry dom in root.Children) {
foreach (DirectoryEntry entry in dom.Children) {
if (entry.Name != "Schema") {
Console.WriteLine(entry.Name);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment