Add an SMTP Address

Adds an SMTP address (based on first name and last name) to all Exchange mailboxes.

1 Star
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • I get an error.
    1 Posts | Last post September 10, 2009
    • get-mailbox -resultsize 600 | foreach { set-mailbox $_.Identity -emailaddresses "SMTP:$($_.FirstName).$($_.LastName)" }
      Set-Mailbox : Cannot convert '' to the type 'Microsoft.Exchange.Data.ProxyAddressCollection' required by parameter 'EmailAddresses'. Cannot p
      erform this operation with the address '' because it is invalid: The address '' is not a valid SMTP address.
      At C:\Documents and Settings\Administrator.INTERNAL\addsmtp.ps1:1 char:80
      + get-mailbox -resultsize 600 | foreach { set-mailbox $_.Identity -emailaddresses  <<<< "SMTP:$($_.FirstName).$($_.LastName)" }