Fix New-InboxRule Folder Path Errors in Exchange Online PowerShell
Question details
Create an Exchange Online inbox rule that moves messages to the correct folder in another user's mailbox.

- Product
- Exchange Online PowerShell
- Device & OS
- not provided
- Scenario
- An administrator is creating an inbox rule for another user's mailbox and needs to specify its destination folder.
- Observed behavior
- New-InboxRule fails when the destination folder path is incorrect or the administrator cannot access the mailbox.
Identify the target mailbox and check whether the destination folder is inside Inbox or at the mailbox root. Connect to Exchange Online PowerShell with an account authorized to manage the target user's inbox rules.
Correct the mailbox and destination folder path
Use the folder's actual location to construct the MoveToFolder path for the target mailbox.
In PowerShell, run Connect-ExchangeOnline and sign in with an account that can manage the target mailbox's inbox rules.
Open the target mailbox in Outlook or Outlook on the web if you have access. Locate CCINBOX and check whether it is under Inbox or at the mailbox root.
In your New-InboxRule command, set -Mailbox to the target mailbox and use -MoveToFolder 'alias:\Inbox\CCINBOX' if CCINBOX is inside Inbox. If it is at the mailbox root, use -MoveToFolder 'alias:\CCINBOX' instead. Replace alias and CCINBOX with the actual mailbox identifier and folder name.
Run your New-InboxRule command with the corrected path and the intended rule conditions. Then run Get-InboxRule -Mailbox 'alias' to check that the rule was created.

Check permissions when the mailbox cannot be opened
Use this check if the path is correct but Exchange Online reports that it cannot open the target mailbox.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format support make it easy to bring existing files over. It does not manage Exchange Online inbox rules or fix mailbox permissions.

Frequently Asked Questions
How do I specify a folder under Inbox in New-InboxRule?
Use a mailbox-qualified path such as -MoveToFolder 'alias:\Inbox\CCINBOX'. Replace the alias and folder name with those for the target mailbox.
What if the destination folder is at the mailbox root?
Omit Inbox from the path. For example, use -MoveToFolder 'alias:\CCINBOX' when CCINBOX is at the mailbox root.
Why does Exchange Online say it cannot open the mailbox?
The account running the command may lack the required Exchange role or mailbox access. Review role assignments and mailbox delegation in the Exchange admin center; Global Administrator or eDiscovery access alone may not be enough.
How can I check whether the inbox rule was created?
After running New-InboxRule, use Get-InboxRule -Mailbox 'alias' in Exchange Online PowerShell and look for the rule by name.




