Setting up Autoreply for all users

Abdullah Tahir khan 61 Reputation points
2021-02-18T05:25:47.12+00:00

Hi there,

I am looking for a PowerShell script to set up auto replies for all users both external and internal senders as we are transitioning to new domain and tenant. Auto reply will be like this “Dear Sender, Please be informed my email ID has been changed to abc@newdomain.com. I want the powershell read the input from CSV file.

please help.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,386 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,503 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,246 Reputation points
    2021-02-19T02:00:03.787+00:00

    @Abdullah Tahir khan

    OOF will only work once. Until OOF is disabled and enabled again, users will not receive OOF again.

    So, I would suggest you use transport rule to inform users directly(Please note, emails will cannot be sent to old domain):
    69769-qa-kyle-09-38-56.png

    If you want to use OOF, you can use command below to enable OOF for all mailboxes:

    Get-Mailbox | Set-MailboxAutoReplyConfiguration -AutoReplyState Enabled -InternalMessage "Dear Sender, the old domain will be abandoned, please contact us with the new domain(myName@newDomain.com)." -ExternalMessage "Dear Sender, the old domain will be abandoned, please contact us with the new domain(myName@newDomain.com)."  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.