Link to home
Start Free TrialLog in
Avatar of Ben Hart
Ben HartFlag for United States of America

asked on

powershell syntax help - get-contact

I've googled, i've checked techNet.. i cannot find a source for the correct syntax used with the -filter option.

Here's what I'm trying to do
get-contact -oganizationalunit 'ou' -filter WindowsEmailAddress =*

Open in new window

I'm wanting to filter by the domain used in the external email address field for a bunch of contacts and I cannot determine the correct syntax to use.  LDAP?  Opath?
Avatar of X Layer
X Layer
Flag of Slovenia image

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


Precisely it! I don't kow why that was so hard to find.. {attribute -like}

Worked like a friggin champ, thank you sir.
Link for filterable attributes:
You do not need a script block, a string containing the condition works the same.