Select Page
This entry has been published on 2013-07-13 and may be out of date.

Last Updated on 2013-07-13.


With Exchange Server 2010, users can set out-of-office / auto-answer messages, e.g. via Outlook or OWA. If they receive message during their OOF time, Exchange returns the user-defined message to the sender automatically – but only once for each sender.

This behaviour can be a problem if you have forgetful customers. They read the message first but and after the next day they wonder why you don’t answer.

However, it would not be useful to auto-answer every mail of the sender, because it can cause loops until one of the both corresponding mailservers crashes. So do not create a custom rule for this.


Exchange itself cannot change this behaviour, but a script can do it which is quite simple. In this example, it re-enables the OOF message every day – so the senders get it once a day:

Log in to your Exchange server and create a file, e.g. c:reset_outofoffice.ps1 and open it with Notepad or Powershell ISE.

Enter these lines:

$enabled = get-mailbox -resultsize unlimited |get-mailboxautoreplyconfiguration | where {$_.autoreplystate -eq "enabled"} | select identity,autoreplystate

$enabled | foreach-object {
set-mailboxautoreplyconfiguration $_.identity -autoreplystate "Disabled"
set-mailboxautoreplyconfiguration $_.identity -autoreplystate $_.autoreplystate

Save the file and open Windows Scheduled Tasks.

Create a new task.

Choose a trigger of your choice, e.g. once a day.

For action, choose to run a program. Enter


In the arguments field, enter

-command “. ‘C:Program FilesMicrosoftExchange ServerV14binRemoteExchange.ps1’; Connect-ExchangeServer -auto; c:reset_outofoffice.ps1”

Set the task to be run with Admin privileges and independent of users logged in.

Save the task and test it.