Powershell Disable Out of Office Rule


I have created a script that sets the out of office assistance without a problem with the command “Set-MailboxAutoReplyConfiguration”. Sometimes there is a special rule created by the user stored in the outlook.

I have tried with Get-InboxRule & Set-InboxRule (it is able get/set only mailbox rules but not out of office rules)

Please have a look at the screenshot. Sometimes users have a rule created in the ooo notification. When I activate the ooo notification with the script and this script sets the text to “I will be back in office on 26/09/2018” some users have an aditional rule for incoming emails with another template (and another incorrect (old) date) configured in the rule. I want to disable such rules with my script. If I dont do this, the sender will get two differant emails with differant information.

Is there a way to disable the configured rules of the user with a Powershell using outlook application ?

Check this out and see if this does what you need.

Though you can manage mailbox rules via the shell as you are aware, you cannot access or manage the OOO rules via powershell. Unfortunately, not all aspects of mailbox management are available via the shell.