Yes, you would need to know the distinguished names for both groups,
then you would construct a filter like this:
(&(!(memberOf=CN=Group
1,OU=somewhere,DC=domain,DC=com))(!(memberOf=CN=Gr oup
2,OU=somewhere,DC=domain,DC=com)))
You don't have to use the LDAP filter, you might choose to use an OPath
Filter with Get-User:
Get-User -Filter { -Not (memberOfGroup -eq "CN=Group
1,OU=somewhere,DC=domain,DC=com") -And -Not (memberOfGroup -eq "CN=Group
2,OU=somewhere,DC=domain,DC=com") }
HTH
Chris
yankz23 wrote:
> Hello,
>
> I am using Exchange 2007. I am looking to perform a search in Active
> Directory for users who are not in specific groups. Is there a way to
> perform this search with multiple groups in 1 search to see who is not
> in these groups? Ive been searching the net but haven't really found an
> answer.
>
> Thanks in advance
>
>
>
|