David-Barrett-MS / PowerShell-EWS-Scripts

A collection of PowerShell scripts that use EWS to perform actions against Exchange mailboxes
MIT License
119 stars 13 forks source link

The specified object was not found in the store., Default folder Root not found. #39

Closed Fimlore closed 8 months ago

Fimlore commented 12 months ago

HI David,

Im trying to Merge-Mailbox folders between two mailboxes,

.\Merge-MailboxFolder.ps1 -SourceMailbox $SourceMailbox -TargetMailbox $TargetMailbox -ProcessSubfolders -CreateTargetFolder -Copy -LogFile ".\CopyStatus.log" -Office365 -OAuth -OAuthTenantId $tenantId -OAuthClientId $clientId -OAuthSecretKey $secret

this command returns

[ErrorReported] ERROR (ThrottledFolderBind): Exception calling "Bind" with "3" argument(s): "The specified object was not found in the store., Default folder Root not found."
Failed to open target message store (NewMailbox@***.nl)

the only way I can get the script to connect, is using "-PathsRelativeToMailboxRoot" - but then it says its copying, yet nothing actually happens :)

also, is it possible to merge the two boxes together, but move the items in a subfolder on the new box, while keeping hierarchy ?

David-Barrett-MS commented 11 months ago

The source mailbox will need FullAccess rights to the target mailbox to be able to copy.

You can specify the target folder using the -TargetFolderList parameter. If you set the target folder to a subfolder, then all the items will be copied there (and folder structure maintained).