Get users Group and members of the groups
$AllUSers = get-aduser -filter {SamAccountName -like “z*” -and Enabled -eq $true } -Properties Memberof,EmployeeNumber -Server <Domain name> | ?{$PSItem.DistinguishedName -notmatch “OU=Service Accounts”} $results = new-object System.Collections.ArrayList foreach($user in $AllSers){ $grps … Read More