Get-ADGroupMember customers | %{$u1= $_; $gr = (get-adgroup call-operators).DistinguishedName; $u = get-aduser -filter {samaccountname -eq $u1.samaccountname -and (MemberOf -recursivematch $gr)} -property memberof; if (($u | measure).count -eq 0){write-host $u1.name -ForegroundColor green}}
Сравниваем пользователей на вхождение в две группы
- Details
- Written by: Senka
- Category: Power Shell
- Hits: 1121