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

[MoveItems]FAILED TO LOCATE TARGET FOLDER #34

Closed gkosmas closed 1 year ago

gkosmas commented 1 year ago

I have used this script many times. It has saved my life a lot.

Recently, I have had the script moving emails and then all of a sudden get multiple errors saying "[MoveItems]FAILED TO LOCATE TARGET FOLDER: " for each folder.

When I stop the script and start it again, it shows up throttling delay (which I understand is normal).

Not sure if something has changed that is causing this?

David-Barrett-MS commented 1 year ago

I have made some changes in that area of code recently, though can't spot anything obviously wrong. Will do some tests for the throttling handling when I get a chance.

gkosmas commented 1 year ago

Are there any logs or output that I can collect for you that will help you?

David-Barrett-MS commented 1 year ago

I've just published an update to the script, but I suspect it won't affect this error. The error only occurs if the target folder can't be found. If you are using the -CreateTargetFolder and get this error, then that implies further that the folder creation failed (could mailbox have reached quota?).

I'm going to close this one off as it's quite old, but if you do still have issues then please reopen.