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 =*@domain.com

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?
ASKER CERTIFIED SOLUTION
Avatar of X Layer
X Layer
Flag of Slovenia 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 Ben Hart

ASKER

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: http://blogs.technet.com/b/evand/archive/2007/02/19/filterable-properties-in-exchange-2007-rtm.aspx#Contact
You do not need a script block, a string containing the condition works the same.