powershell cmd to change inbox rules and folders

J-3804 1,601 Reputation points
2023-12-11T23:34:06.9766667+00:00

Hi team,

Is there any PowerShell cmd to change inbox rules and folders for 50 users?

Appreciate your help!

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Outlook | Windows | Classic Outlook for Windows | For business
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kai Yao 37,776 Reputation points Moderator
    2023-12-12T01:34:31.6133333+00:00

    Hi @J-3804,

    Sorry but can you clarify on "change inbox rules and folders"?

    If you mean the original inbox rule is like:

    condition: If the message is from user01

    action: move it to a folder named "important"

    Would you like to change the folder "important" to another one in this case?

    If this is the case, you can follow below steps.

    1.run this cmdlet to get the inbox rule you want to modify

    Get-InboxRule -Mailbox ******@Contoso.com | fl Name,Description,RuleIdentity,MoveToFolder
    

    2.run this cmdlet to modify the target folder (the target folder must exist in the mailbox)

    Set-InboxRule -Identity "inbox rule name or RuleIdentity" -MoveToFolder ******@Contoso.com:\new_target_folder
    

    If you would like to do this for 50 users, do the rules have something in common?

    For example, these rules move messages from user01 to "important" folder, and your current purpose is to change the folder to "archive".


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.