Cross mailbox search Exchange 2007 Error

When running the command:
Export-mailbox -id -TargetFolder "User1Data" -TargetMailbox

I am getting the following error:
Export-Mailbox : Error was found for Larry Hols ( because: Error occurred in the step: Creating target folder in the target mailbox. An unknown error has occurred., error code: -2147221233
At line:1 char:15
+ Export-mailbox <<<<  -id -TargetFolder User1Data -TargetMailbox
    + CategoryInfo          : InvalidOperation: (0:Int32) [Export-Mailbox], RecipientTaskException
    + FullyQualifiedErrorId : 4DDBADE7,Microsoft.Exchange.Management.Recipient

Any ideas on what I need to change in the syntax?
 I tried with and without quotes around "User1Data" and I tried to create the folder on the recipients email ahead of time.

Thank you!
John HausknechtITAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amit KumarCommented:
It  may be access permission issue, please assign full access on both mailboxes and then try it. Please follow this article
Will SzymkowskiSenior Solution ArchitectCommented:
Yes make sure that you have full access to the mailbox (the one you are exporting) also make sure that in the target mailbox/folder it is created before you run the script.

Then run the command again.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John HausknechtITAuthor Commented:
OK I see I need to run this command
Add-MailboxPermission -Identity john -User Admin01 -AccessRights FullAccess

What would go in place of Admin01?

Would the end user see any signs of this.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Amit KumarCommented:
Add-MailboxPermission -Identity "John" -User <your account which is exporting mail data> -AccessRights Fullaccess -InheritanceType all
Will SzymkowskiSenior Solution ArchitectCommented:
Would the end user see any signs of this.
No this is simply applying an Exchange ACL on the mailbox. Once the export is complete you can use tthe same command but changing Add-MailboxPermission to Remove-MailboxPermission.

John HausknechtITAuthor Commented:
Thank you very much for your help and fast responses!!!
We have been able to retrieve the needed data.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.