SAM2009
asked on
Set 365 mailbox rule with PowerShell
Hi,
How can I create this 365 mailbox rule with PS? Example:
Name : 365 Service Alert
Priority (top of the list of rules) : 1
Body contains words: Major and Impact
If the message was received from '365Alert@microsoft.com'
Take the following actions:
move the message to folder: Inbox\365Alerts
and stop processing more rules on this message
How can I create this 365 mailbox rule with PS? Example:
Name : 365 Service Alert
Priority (top of the list of rules) : 1
Body contains words: Major and Impact
If the message was received from '365Alert@microsoft.com'
Take the following actions:
move the message to folder: Inbox\365Alerts
and stop processing more rules on this message
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How can I set the PS if my subfolder name is in 2 words, like: 365 Alerts
Take the space out of the folder name. :)
...have you tried putting the space in the command?
...have you tried putting the space in the command?
ASKER
OK work with space too. Thanks
One more question. To get my new rule on the top of the list is it with Priority parameter we can do that?
One more question. To get my new rule on the top of the list is it with Priority parameter we can do that?
ASKER
Sorry I just realize that I need to Priority = 0 instead of 1
Yes, the priority parameter should do that
The Priority parameter specifies a priority for the Inbox rule that determines the order of rule processing. A lower integer value indicates a higher priority
ASKER
Also this: -BodyContainsWords "Major","Impact"
Set a rule like body contains: Major or Impact
How can I set for "AND", like body contains: Major AND Impact
Set a rule like body contains: Major or Impact
How can I set for "AND", like body contains: Major AND Impact
How can I set for "AND", like body contains: Major AND Impact
I don't think that is possible.
ASKER
Weird no? I also checked in MS site and there nothing about AND.
ASKER
The workaround I found is to add a second condition. Many thanks!
Here’s the cmdlet syntax you need.
https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps