Set Out of Office on behalf of User with PowerShell

Hello,

Today we’ll learn about how to set out of office on behalf of users. This can be be handy if a user leaves the company and didn’t set any out of office before leaving. It can also be helpful for any emergency leave.

Set Out of Office in behalf of User

To set an out of office you need some administrative privileges :

You also need to do it from PowerShell, Microsoft gives us a cmdlet :

Set-MailboxAutoReplyConfiguration

If you look at the help, you’ll find some good example that will help you understand how to use this cmdlet despite the parametersets, validateset and parameter attributes missing.

Enable :

Set-MailboxAutoReplyConfiguration -Identity  Dumbo@itfordummies.net -ExternalMessage "This is a test mailbox !" -InternalMessage "You hit a test and dev mailbox !" -AutoReplyState Enabled

Schedule :

Set-MailboxAutoReplyConfiguration -Identity  Dumbo@itfordummies.net -ExternalMessage "This is a test mailbox !" -InternalMessage "You hit a test and dev mailbox !" -StartTime ([DateTime]::Now) -EndTime (Get-Date -Year 2020) -AutoReplyState Scheduled

Note : ParameterSets aren’t define, so pay close attention to the help documentation to really understand how to use this cmdlet.

Verify

Once the cmdlet ran, you can check it :

Get-MailboxAutoReplyConfiguration dumbo@itfordummies.net
Set Out of Office in behalf of User - Check

Set Out of Office in behalf of User – Check

One thought on “Set Out of Office on behalf of User with PowerShell

  1. Pingback: Get Mailbox Out of Office Configuration PowerShell - It for DummiesIt for Dummies

Leave a Reply