You can use this snippet to parse an email address and extract the different components of it. (Tip. It works for UPNs too)
New-Object "System.Net.Mail.MailAddress" -ArgumentList $emailAddress
You can also send strings formatted with the display name. For example:
‘Microsoft Azure <[email protected]>’
PS C:\> $emailAddress = '[email protected]' >> New-Object "System.Net.Mail.MailAddress" -ArgumentList $emailAddress DisplayName User Host Address ----------- ---- ---- ------- mick.jones contoso.com [email protected]