Set Out of Office on a Mailbox using PowerShell for Exchange

 


To get the existing settings:

 

Get-MailboxAutoReplyConfiguration “john.smith

 

 

To set the Out of Office (internal and external):

 

Set-MailboxAutoReplyConfiguration -identity “john.smith” -AutoReplyState enabled -EndTime 07/03/2018 -InternalMessage “Please note I am on a training course with no access to my emails until the 8th March. For any urgent queries please could you contact admin@contoso.com. Otherwise I will respond once I return. Thanks john.smith .” -ExternalMessage “Please note I am on a training course with no access to my emails until the 8th March. For any urgent queries please could you contact admin@contoso.com. Otherwise I will respond once I return. Thanks john.smith .”

 

 

To disable Out of Office/Auto Reply:

 

Set-MailboxAutoReplyConfiguration “john.smith” -AutoReplyState disabled

 

 

To disable Out of Office/Auto Reply and clear the Internal/External message:

 

Set-MailboxAutoReplyConfiguration -identity “john.smith” -AutoReplyState disabled -InternalMessage “” -ExternalMessage “”

 

 

To turn off and clear reply text:

 

Set-MailboxAutoReplyConfiguration “john.smith” –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null