Forum Discussion

Deleted's avatar
Deleted
Aug 29, 2016
Solved

Setup Auto Reply from email addresses

Hello All,   We are almost finishing the integration project with another email domain. We are planning to set up an automated response for 150+ users for their legacy email addresses.   How do w...
  • SanthoshB1's avatar
    SanthoshB1
    Aug 29, 2016

    You can use the below script to get this done. 

     

    $NewdomainName="@xyz.com"
    $Mailboxs=get-mailbox -resultsize unlimited | Where { $_.RecipientTypeDetails -eq ‘LegacyMailbox’ } 
    Foreach($Mailbox in $mailboxs)
    {
    $Message="email address no more exist please send email to"+$Mailbox.Alias+$NewdomainName
    Set-MailboxAutoReplyConfiguration -Identity $Mailbox.Identity -AutoReplyState scheduled -InternalMessage $Message -ExternalMessage $Message
    } 

Resources