Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Microsoft 365 / Configure Auto-Reply (Out of Office) Message in Exchange and Microsoft 365

September 15, 2023 ExchangeMicrosoft 365OutlookPowerShell

Configure Auto-Reply (Out of Office) Message in Exchange and Microsoft 365

An automatic reply feature (Auto-Reply, Out of Office Message/OOF) allows an Exchange user to configure a rule in their mailbox to automatically send a specific message in reply to all incoming e-mails. Usually, an auto-reply is enabled when a user is absent from the office for a long time (vacation, business trip, etc.). A user may configure an automatic reply themselves through Outlook or Outlook on the web graphical interfaces. In this article, we will show how to enable, disable and configure an automatic reply message in Exchange Server 2019/2016/2013/2010 and Exchange Online (Microsoft 365) from the Exchange Admin Center (EAC) or using PowerShell.

Contents:
  • How to Enable Automatic Reply Message in Exchange Server?
  • Configuring Out Of Office Messages in Microsoft 365 (Exchange Online)

How to Enable Automatic Reply Message in Exchange Server?

You can configure an auto-reply for another user’s mailbox through the graphical Exchange Control Panel (ECP):

  1. Sign in to Exchange Control Panel, click your user icon in the top right, and select Another user;Exchange Control Panel - connect another user mailbox
  2. Select a user mailbox you want to enable an automatic reply for;
  3. Click Set up an automatic reply message;
    Set up an automatic reply (OOF) message
  4. Here you can enable OOF by checking the Send automatic replies option and setting a period when you want auto-replies to be sent (Send replies only during this time period). Then enter a text of automatic reply message for users in your organization and a text for external users (Send automatic reply messages to sender outside my organization);
    Exchchange Server - set automatic reply another user
  5. Save the changes and close OWA.

Now if you send an e-mail to a user mailbox, you will get a message with the auto-reply text. Please note that only one reply is sent to each sender (if you send another e-mail to the same address, you won’t receive the OOF message). It helps to protect Exchange from e-mail loops.

In the Exchange Server, you can configure an automatic reply using the Get-MailboxAutoReplyConfiguration and Set-MailboxAutoReplyConfiguration PowerShell cmdlets.

Open the Exchange Management Shell on your Exchange Server or connect it remotely using PowerShell.

To enable automatic replies for a user mailbox, use the following PowerShell script:

$username="[email protected]"
$starttime = "10/17/2022 00:00:01"
$endtime = "10/21/2022 23:59:59"
$msg_internal ="Dear recipient, I am out of office from {Date} to {Date} due to {reason}. If you cannot wait, call me at {phone number}"
$msg_external ="Dear recipient, I am out of office from {Date} to {Date} due to {reason}. If you require immediate assistance, please contact {Name} at {Email}"
Set-MailboxAutoReplyConfiguration $username –AutoReplyState Scheduled –StartTime $starttime –EndTime $endtime InternalMessage $msg_internal -ExternalMessage $msg_external -ExternalAudience All

In this example, the automatic reply period was set (from October 17 to 21). Internal users in the Exchange organization and external users will receive different OOF messages.

In order to disable automatic reply for a user mailbox, run the following:

Set-MailboxAutoReplyConfiguration [email protected] –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null

You can additionally configure automatic forwarding of all incoming e-mails to a specific e-mail address:

Set-Mailbox [email protected] -ForwardingAddress [email protected] -DeliverToMailboxAndForward $true

[alert]To disable email auto-forwarding:

Set-Mailbox [email protected] -ForwardingSmtpAddress $null

To check if auto-reply is enabled for a user and display the current OOF message, run the command below:

Get-MailboxAutoReplyConfiguration [email protected]

To get a list of all mailboxes in an organization with auto-reply enabled:

Get-Mailbox | Get-MailboxAutoReplyConfiguration | Where-Object {$_.AutoReplyState –eq "scheduled"} | fl identity,MailboxOwnerId,AutoReplyState,StartTime,EndTime

If you want to find users with permanent auto-responder, replace scheduled with enabled.

Note. You can delegate auto-reply configuration to other non-administrative Exchange accounts. To do it, assign them Mail Recipients and User Options roles.

Configuring Out Of Office Messages in Microsoft 365 (Exchange Online)

In Exchange Online (Microsoft 365), you can also enable automatic replies for user mailboxes.

You can enable OOF through the Exchange Admin Center (https://admin.exchange.microsoft.com/):

  1. Go to Recipients –> Mailboxes;
  2. Select a mailbox;
  3. In the mailbox properties window, click the Others tab and select Automatic Replies -> Manage automatic replies;
    Manage automatic replies - Microsoft 365 mailbox
  4. In the next window, you can enable an automatic reply and enter a reply text for internal and external senders.
    manage automatic replies in Exchnage Online
Note that you cannot schedule an out-of-office period in Microsoft 365 Admin Center.

In Exchange Online (Microsoft 365), you can also configure auto-reply for mailboxes using PowerShell. The same commands as in the Exchange Server are used (Get-MailboxAutoReplyConfiguration and Set-MailboxAutoReplyConfiguration).

Connect to your Exchange Online tenant using the EXOv2 PowerShell module:

Connect-ExchangeOnline

To enable an automatic reply:

Set-MailboxAutoReplyConfiguration -Identity b.hoffmann -AutoReplyState Enabled -InternalMessage "Internal autoreply message text" -ExternalMessage "External autoreply message text"

To list current auto-reply settings for a mailbox:

Get-MailboxAutoReplyConfiguration -Identity b.hoffmann

Set-MailboxAutoReplyConfiguration - configure out of office message in microsoft 365 with PowerShell

To disable OOF:

Set-MailboxAutoReplyConfiguration -Identity b.hoffmann -AutoReplyState Disabled

Microsoft 365 has some additional auto-reply options you can set using the Set-MailboxAutoReplyConfiguration cmdlet:

  • -AutoDeclineFutureRequestsWhenOOF $true – decline all meeting requests while OOF is active;
  • -DeclineAllEventsForScheduledOOF $true – reject all accepted events scheduled for the out-of-office period;
  • -DeclineMeetingMessage – set a message text to a meeting organizer if it is configured by one of the previous options;
  • -CreateOOFEvent $true – create a calendar event for the OOF period. This will make it easier for meeting organizers to use a scheduling assistant;
  • -OOFEventSubject – set an OOF event subject to be displayed in the Outlook calendar.
If you want to use more complex auto-reply scenarios (forwarding, conditional replies, etc.), you can use Exchange inbox rules.

2 comments
0
Facebook Twitter Google + Pinterest
previous post
Using VMware Converter for P2V Migration (Physical to Virtual)
next post
Outlook: Your Server Does Not Support the Connection Encryption Type

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

2 comments

Jimmy October 20, 2022 - 4:58 pm

Hi.
I look for possibility to send more as one reply to each sender.
Can someone help me please?
Thanks

Reply
admin October 21, 2022 - 12:41 pm

When the Out of Office Assistant is enabled, only one reply is sent to each sender, even if you receive multiple messages from that person.
If you don’t like this behavior, you can create an inbox rule (rules -> have server reply using a special message) in the user’s mailbox that is sent in response to each e-mail.
But the advantage of OOF is that it is displayed as mailtip in outlook

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • FAQ: Licensing Microsoft Exchange Server 2019/2016
  • Whitelist Domains and Email Addresses on Exchange Server and Microsoft 365
  • Moving Exchange Mailboxes to Different Database
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top