In many cases it’s very useful to have an autoreply on mailboxes. Maybe during user vacation or when on leave. Or maybe you want a shared mailbox to immediately notify customers that a message was received.
This post will show you how to configure an auto-reply for mailboxes using the Set-MailboxAutoReplyConfiguration PowerShell cmdlet. The command can be used against both on-premises and Office 365 mailboxes.
In the last section we’ll look at how to configure a mailbox autoreply using the Exchange Admin Center (EAC).
Mailbox Auto-Reply Using PowerShell
Use the Set-MailboxAutoReplyConfiguration command to set an auto-reply on your Office 365 mailbox. The below example shows you how:
Connect-ExchangeOnline $InternMsg = "I'm out of office, please reach out to Tycho Brahe during my absence" $ExternMsg = "I'm out of office, please contact email@example.com during my absence" Set-MailboxAutoReplyConfiguration -Identity ole.roemer -AutoReplyState Enabled -InternalMessage $InternMsg -ExternalMessage $ExternMsg Disconnect-ExchangeOnline
Start by establishing a connection with Exchange Online (line 1 – 3).
Define messages to internal and external senders (line 4 – 5).
Set the auto-reply using the Set-MailboxAutoReplyConfiguration command (line 6).
End your Exchange Online session when done (line 7). If you don’t explicitly close the session you risk depleting the number of available sessions.
Instead of enabling the auto-reply right away you can also schedule it by setting the AutoReplyState parameter to scheduled. You must then also supply parameters -StartTime and -EndTime.
To verify the auto-reply has been configured use the Get-MailboxAutoReplyConfiguration cmdlet:
PS C:\> Get-MailboxAutoReplyConfiguration -Identity ole.roemer RunspaceId : f07d909f-7622-440c-8fcd-9f0bbc6b58d8 AutoDeclineFutureRequestsWhenOOF : False AutoReplyState : Enabled CreateOOFEvent : False DeclineAllEventsForScheduledOOF : False DeclineEventsForScheduledOOF : False EventsToDeleteIDs : EndTime : 3/9/2020 1:00:00 PM ExternalAudience : All ExternalMessage : <html> <body> I'm out of office, please contact firstname.lastname@example.org during my absence </body> </html> InternalMessage : <html> <body> I'm out of office, please reach out to Tycho Brahe during my absence </body> </html> DeclineMeetingMessage : OOFEventSubject : StartTime : 3/8/2020 1:00:00 PM Recipients : ReminderMinutesBeforeStart : 0 ReminderMessage : MailboxOwnerId : Ole Roemer Identity : Ole Roemer IsValid : True ObjectState : Unchanged
As you may notice, by default the auto-reply is set to expire 24 hours after being activated. You can change this default expiration by setting the AutoReplyState to scheduled and supplying an expiration with the -EndTime parameter.
Mailbox Auto-reply Using the Exchange Admin Center (EAC)
You can also configure the auto-reply using the Exchange Admin Center. To configure an auto-reply follow these steps:
Open up the Exchange Admin Center using your admin account. Click your account icon in the upper right corner, click “Another user…” and select the mailbox you want to configure:
In the new window, click “Organize email“, click “automatic replies” and set the desired auto-reply:
We hope you found the information you needed in relation to configuring an Office 365 mailbox auto-reply!
If you want more inspiration on PowerShell scripting or Office 365 Management please have a look at our blog.
If you want to save lots of hours on your weekly Office 365 user, mailbox and license administration AND get rid of your on-premises Exchange Server, have a look at Easy365Manager. It’s available as a fully functional 30 day trial.