Add an SMTP Address

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

 
 
 
 
 
1 Star
(1)
Add to favorites
Exchange
8/10/2009
E-mail Twitter del.icio.us 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)@company.com" }
       
      
      Set-Mailbox : Cannot convert 'SMTP:.@company.com' to the type 'Microsoft.Exchange.Data.ProxyAddressCollection' required by parameter 'EmailAddresses'. Cannot p
      
      erform this operation with the address 'SMTP:.@company.com' because it is invalid: The address '.@company.com' 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)@company.com" }