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.
- Exchange Management Shell (EMS) 2013+
- GlobalFunctions library as described here: http://scripts.granikos.eu
- Locally installed Exchange Web Services (EWS) Library, https://www.microsoft.com/en-us/download/details.aspx?id=42951
# 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
- 1.0, Initial community release
- Download and follow at Github: https://github.com/Apoc70/Manage-OOF-Settings
Rhoderick Milne (https://blogs.technet.microsoft.com/rmilne)