PowerShell Remove Users from Ad Group CSV
Write-Host “Removing users from an AD group.” Import-Csv “Path\to\file\users.csv” | ForEach-Object { $user = $_.email $aduserinfo = Get-ADUser -Filter “EmailAddress -eq ‘$user’” Remove-ADGroupMember -Identity “GroupName” -Members $aduserinfo -Confirm:$false Write-Host “User $user successfully removed from the AD group” }