Overview
Below we have provided step by step instructions for making the required mail flow rule. We have detailed making the rule from the desktop app and from the web. A rule made in one will be pushed to the other.
- Setting up a rule on the Outlook Desktop App
- Setting up a rule on the web
- Having your IT Windows Administrator push these changes to firm users
Setting Up a Rule on the Outlook Desktop App.
This section details how to set up the required rule on the desktop app. The example below is to delete the meeting invites and updates. This will not delete the calendar events themselves nor send decline responses. You can also move the emails to a folder outside of the inbox.
On the desktop app, you can do this with the following rules. For directions on how to do this on the web, skip to the next section.
From the Outlook Home tab, navigate to Rules > Create Rule
When the basic dialog opens, press the “Advanced Options” button to open the Rules Wizard.
From here you will need to set up the Condition, what to do with the message, and set any exceptions.
You will need two conditions:
- Which is a meeting invitation or update
- With specific words in the sender’s address
- Once you select this condition, click on specific words in and type in your firm’s domain.
For ‘what to do you want to do with this message?’ you have two main options, you can delete the message, or you can move it to a specified folder. Deleting the message will not delete the tentative meeting from your calendar nor will it accept it. You will have to go to your calendar to accept or decline meeting invites.
Finally, you can set exceptions. If you need to know about meetings from a specific member of the firm, you can add them here under “Except if from people or public group” or if there is a specific word(s) in the name of the activity.
Once you are done, press finish and it will apply to all new meeting invites.
Setting up a rule on the web
The process is mostly the same as above but the interface is different.
Start by going to the Settings Gear in the top panel then press “View all Outlook Settings”, this will be at the bottom of the panel.
In the dialog that opens navigate to Mail > Rules > Add New Rule
Give your rule a name and then set the conditions to be
- “Sender address includes” and type in your firm’s domain
- Type: Invitation
Then set your action, either delete or move to, and you can set an exception(s) if you need to see invites from specific people at your firm or under certain conditions.
Having your IT Windows Administrator push these changes to firm users
Your firm’s IT should be able to use the following steps to set up a rule and then apply to all members of the firm.
This article is written based on powershell version 5
It is important to realize that you should test the mailbox rule prior to implementing to all or a bulk of users. Unintended consequences are likely if you are not careful. Be aware that you are performing these actions at your own risk.
- Run powershell as administrator
- Install-Module -Name ExchangeOnlineManagement
- Import-Module ExchangeOnlineManagement
- Connect-ExchangeOnline # You will be prompted for credentials in a pop up dialog box.
- Review the following on how to define the rule.
- You can also create a rule on a mailbox to find the commands to use for powershell
- Create the rule in a temporary or personal mailbox with settings to match your requirements.
- To see the rule configuration in powershell run, Get-InboxRule -Mailbox 'username' | Select *
- The results should look like this.
- In order to generate a rule from this output, New-InboxRule -Name 'Delete internal meeting invites and updates' -FromAddressContainsWords '@centerbase.onmicrosoft.com' -MessageTypeMatches 'Calendaring' -DeleteMessage $true
- If you execute this command as is, it will generate a rule to the current logged in user, so you must specify the mailbox you wish to apply the rule to using -mailbox attribute
- To apply the rule to a mass of users you will need to grab all the users with the following command, $users = get-mailbox
- You can review the results of the command by typing $users, to see more details of the results, $users | select *
- You can use where statements to filter the list down, for example if you only wanted to apply the rule to QA accounts based on the following output
- You would use the following command, $users | where name -like *qa*
- If you would like to apply the rule to QA and QA3
- Since we have finished filtering our results we need to put the results in a variable, e.g. $users = $users | where name -like *qa* | where name -NotLike 'qa2'
- There are a lot of methods to filter the results and even the examples are very basic methods.
- Now that we have a list of users we wish to apply the rule to, in a variable we are going to create a foreach statement using the $users variable, foreach ($user in $users) { New-InboxRule -Name 'Delete internal meeting invites and updates' -FromAddressContainsWords '@centerbase.onmicrosoft.com' -MessageTypeMatches 'Calendaring' -DeleteMessage $true -Mailbox $user.name }
- Running the above command will apply the rule to all mailboxes in the Users variable.
- You can verify the rule was applied to the mailbox by the following command, e.g. Get-InboxRule -Mailbox 'qa3@centerbase.onmicrosoft.com' | select Name, Description | format-list
- If you would like to remove the rule the following command can be used. Remove-InboxRule -Identity (Get-InboxRule -Mailbox qa@centerbase.onmicrosoft.com | where name -like 'Delete internal meeting invites and updates').Identity -Confirm:$false
- Confirm it was removed with, Get-InboxRule -Mailbox 'qa3@centerbase.onmicrosoft.com' | select Name, Description | format-list
- No output will be shown if the rule was removed as long as no other rules exist.
- To remove the rule from all users it was applied, foreach ($user in $users){
$rules = Get-InboxRule -Mailbox $user.UserPrincipalName | where name -like 'Delete internal meeting invites and updates'
foreach ($rule in $rules) { remove-inboxrule -Identity $rule.Identity -confirm:$false }
}
Comments
0 comments
Please sign in to leave a comment.