Exchange 2019 Quick Tip: Set Out of Office for a user using PowerShell (EMS)

In your organization, you get a call from a departmental managers secretary to advise he/she forget to set there Out of Office and have requested you to do so.

To set it, quickly launch the Exchange Management Shell (EMS) and run the following command:

  • Set-MailboxAutoReplyConfiguration -Identity User1 -AutoReplyState Enabled -InternalMessage "Playing golf with a client" -ExternalMessage "I am on vacation with limited access to email"

https://everything-powershell.com/wp-content/uploads/2019/07/image-5.png

Update the internal and external message to whatever is required. Wait for replication and all should be set.

To check the state of the Out of Office, run the following command:

  • Get-MailboxAutoReplyConfiguration User1

https://everything-powershell.com/wp-content/uploads/2019/07/image-6.png