Just as a note to myself. If I want to search Exchange Online for an X500 address the following two should help:
1 2 3 4 5 |
# Search LegacyExchangeDN Get-Mailbox -Filter {LegacyExchangeDN -eq "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=xxxx"} # Search ProxyAddresses Get-Mailbox -Filter {EmailAddresses -like "*/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=xxxx*"} |
Wasn’t sure if -like
will search the multi-valied EmailAddresses property but I learnt from the help page that it is possible. And no, -contains
does not work even though it’s in the list of operators.
Thank goodness for this, would have hated doing a Get-Mailbox -ResultSize Unlimited
and then piping into a Where-Object
.