Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created July 2, 2014 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-plus/d4837dfe71fa23726644 to your computer and use it in GitHub Desktop.
Save r-plus/d4837dfe71fa23726644 to your computer and use it in GitHub Desktop.
Find all current domain controllers.
# http://gallery.technet.microsoft.com/scriptcenter/101ebd1a-effe-4a89-9c38-7673fa4d1687
$domain = [directoryServices.ActiveDirectory.Domain]::GetComputerDomain()
$domain.FindAllDomainControllers()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment