Remove Out-Of-Office rules from user mailbox

Exchange Server 2013Exchange Server 2016Description

This script searches for OOF rules created by users using the Outlook rule tab in the OOF assistant and deletes existing OOF rules.

In preparation to configure compliant Out-Of-Office (OFF) settings for users, any existing OOF rule needs to be deleted. The script will use either an existing Exchange Server EWS library or the Managed EWS library installed using the default file path.

This is the first of two scripts for the complete solution. Find the second script here.

The script access the mailbox rules using Exchange Web Services. Therefore the account executing the script either needs to have ApplicationImpersonation rights or full access to the user mailbox.

Requirements

Examples

# EXAMPLE 1
# Find any existing OOF rule and write results to log file
Remove-OOFRule 

# EXAMPLE 2
# Find and delete any existing OOF rules in all user mailboxes and 
# write delete actions to log file
Remove-OOFRule -Delete

# EXAMPLE 3
# Find and delete any existing OOF rules for user SomeUser@varunagroup.de 
# and write delete actions to log file
Remove-OOFRule -Mailbox SomeUser@varunagroup.de -Delete

Version History

  • 1.0, Initial community release

Links

Additional Credits

Rhoderick Milne (https://blogs.technet.microsoft.com/rmilne)

Follow

%d Bloggern gefällt das: