You are trying to find a mailbox based on a specific email Address?
get-mailbox <email Address>
is all you need. it will find it even if its not primary
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
when a colleague leaves the company, we usually attach his e-mail address up to two months to a colleague which worked with him so any e-mail can still be processed and answered.
I would like to create a PS Query which shows me the entered smtp address and then displays to which mailbox is this non-primary e-mail address (alias) assigned.
I had this, but it does not work:
Get-Recipient -ResultSize unlimited | Select Name -expand EmailAddresses | Where {$_.SmtpAddress -match ".FIRSTNAME"} | Format-Table Name, SMTPAddress
I tried entering full e-mail address, first couple of letters and then * but it does not show any results. We have Exchange Online.
Cheers
You are trying to find a mailbox based on a specific email Address?
get-mailbox <email Address>
is all you need. it will find it even if its not primary
This also works fine when we don't want/know the whole alias address:
Get-EXOMailbox | Where {$_.EmailAddresses -like "SEARCH_TERM"} | select DisplayName, PrimarySMTPAddress