Link to home
Start Free TrialLog in
Avatar of ThinkPaper
ThinkPaperFlag for United States of America

asked on

Filter Addresslist by OU?

All -

I am currently running this powershell to create an addresslist that searches for any contacts that ends with "blah.com". The problem is I want to narrow this down so it does not search the entire domain, but rather focus on 1 OU. Is this possible with the "new-addresslist" command? I am not sure how to do this. I have attempted to use "recipientcontainer" but from what I'm reading, you can't use that when you are using "recipientfilter".

The current command I have is: (which does not narrow to the specific OU)
new-addresslist -name "Blah Contacts" -recipientfilter {(recipienttype -eq 'MailContact') -and (ExternalEmailAddress -like "*blah.com")}

Open in new window


Thanks!
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ThinkPaper

ASKER

Argg I was afraid of that! =)