d
Size: a a a
d
EK
$groups = Get-Content -Path $PSScriptRoot\'groups.txt' #Add desired groups to groups.txt
$user = 'username'#put user's login here
$groups| % Try
{
{Get-ADGroup -Filter {Name -eq $_}}|Remove-ADGroupMember -Member $user -Confirm:$False
Echo '$user removed from $_.name'
}
Catch
{
Echo 'Unable to remove user'
}
EK
EK
EK
P
EK
P
AS
EK
EK
EK
AS
AS
EK
EK
EK
AS
P
$a | %{$_}
, a foreach ($b in $a) {$b}
P