Skip to content

Instantly share code, notes, and snippets.

@thomasrayner
Created July 8, 2016 15:29
Show Gist options
  • Save thomasrayner/5a976c4286a294f46b2e20948c5b37cd to your computer and use it in GitHub Desktop.
Save thomasrayner/5a976c4286a294f46b2e20948c5b37cd to your computer and use it in GitHub Desktop.
$groups = import-csv "$(get-temp)\groups.csv"
foreach ($gr in $($groups.group))
{
Get-ADGroupMember $gr | % { Get-ADUser $_.SamAccountName -properties Enabled }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment