Skip to content

Instantly share code, notes, and snippets.

@martin9700
Last active August 29, 2015 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save martin9700/af3fc9f70368b6a62434 to your computer and use it in GitHub Desktop.
$DCs = Get-ADDomainController -Filter * | Select -ExpandProperty Name
$AllUsers = ForEach ($DC in $DCs)
{ Get-ADUser -Filter * -SearchBase "OU=People,CN=athena,CN=health" -Server $DC
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment