Here is a script for setting an Out of the office (OOO) message to a list of users.
Tested on Exchange 2010.
First, careat a CSV file (OOOUsers.csv) with all the users in one column and put it in c:\ooo\.
Than, create a *.ps1 file and copy the script into it.
Save it in C:\ooo\.
# Location of the users CSV file $OOOUserList = get-content -Path c:\ooo\OOOUsers.csv # Set OOO start time $OOOStart = '08/20/2015 00:00:01' # Set OOO end time $OOOEnd = '08/25/2015 23:59:59' # Set the OOO InternalMessage $InternalMsg = "I'm OOO for now.....<BR> Thanks." # Set the OOO ExternalMessage $ExternalMsg = "I'm OOO for now....<BR> Thanks." foreach ($item in $OOOUserList){ write-host Creating OOO for: $item Set-MailboxAutoReplyConfiguration -Identity $item -AutoReplyState Scheduled -StartTime $OOOStart -EndTime $OOOEnd -InternalMessage $InternalMsg -ExternalMessage $ExternalMsg }
Now run the script…