Skip to content

Instantly share code, notes, and snippets.

@brettmillerb
Created March 27, 2018 20:10
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 brettmillerb/2372b9e93c771b74c38c02c8e823afcf to your computer and use it in GitHub Desktop.
Save brettmillerb/2372b9e93c771b74c38c02c8e823afcf to your computer and use it in GitHub Desktop.
$users = get-aduser -filter {memberof -like '*'} -Properties memberof
$hash = @{}
foreach ($user in $users) {
$hash.add($user.samaccountname,$user)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment