Schedule an out of office message using PowerShell

Today I had to configure an out of office message for a mailbox that needed to activate at a specific time.  Exchange 2010 allows me to do this easily using the Set-MailboxAutoReplyConfiguration PowerShell cmdlet:

Set-MailboxAutoReplyConfiguration <alias> -AutoReplyState Scheduled -ExternalAudience All -InternalMessage <message> -ExternalMessage <message> -StartTime <date/time> -EndTime <date/time>

Here is an example:

Set-MailboxAutoReplyConfiguration Dave.Webb -AutoReplyState Scheduled -ExternalAudience All -InternalMessage “I am away on annual leave, please contact the helpdesk if your request is urgent” -ExternalMessage “I am away on annual leave, please contact the helpdesk if your request is urgent” -StartTime “12/15/2015 18:00:00” -EndTime “12/31/2015 00:00:00”

The Set-MailboxAutoReplyConfiguration command supports the following parameters:

  • Alias – the alias of the mailbox
  • AutoReplyState – enable, disable or schedule the auto reply
  • InternalMessage – the message to display to users in the same Exchange organisastion
  • ExternalMessage – the message to display to users outside of the Exchange organisation
  • StartTime – messages will not be sent until this date and time
  • EndTime – messages will stop being sent at this date and time
[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]