Thursday, August 3, 2017

How to configure Exchange 2013 to Rest the Out of Office to send an email every day instead of once-

Here is how you set up Exchange 2013 to send an Out of Office Response Daily instead of just once-

1) Create a folder on your Exchange server.  For Example, C:\ExchangeOOOReset.

2) Open Notepad and enter the following-
$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

3) Save the file as OOOReset.ps1, save it in C:\ExchangeOOOReset.  Make sure you select "All Files" so it doesn't add .txt to the files.

4) Open Task Scheduler, click Create Basic Task.

5) Name it, ExchangeOOO, click Next, Next, select the time of day it should reset, Next, Start a Program.

6) Under Program/Script-

7) Under Add Arguements-
-NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\ExchangeOOReset\oooreset.ps1"

That's it!