Solved

Error deleting emails from another user's mailbox

Posted on 2013-02-01
11
363 Views
Last Modified: 2013-02-02
I have a user that is waaaay over her limit so I trying to empty her deleted and sent items. I ran the following shell command:
export-mailbox -identity "heather" -includefolders "\deleted items" -deletecontent
But got the following error:

Export-Mailbox : Error was found for Heather Whitley (Heather@taylorrealestate.
com) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error:
MAPI or an unspecified service provider.
ID no: 00000000-0000-00000000, error code: -1056749164
At line:1 char:15
+ export-mailbox <<<<  -identity "heather" -includefolders "\deleted items" -deletecontent
    + CategoryInfo          : InvalidOperation: (0:Int32) [Export-Mailbox], Re
   cipientTaskException
    + FullyQualifiedErrorId : DE389E14,Microsoft.Exchange.Management.Recipient
   Tasks.ExportMailbox
0
Comment
Question by:xzay1967
  • 6
  • 5
11 Comments
 
LVL 9

Expert Comment

by:EMJSR
ID: 38845639
You didn't say which version of Exchange you're running, but this or a similar error was, I believe, solved in the Exchange 2007 update roll-up 4 for Exchange 2007 SP1.

A simpler solution could also be to check the access rights. Does your account have "Full Access Permission" to Heather's mailbox?

You can use the following Shell command:

Add-MailboxPermission –Id <UserMailbox> –User <Account to have permissions> –AccessRights ‘Full Access’ –Confirm:$false

Open in new window

0
 

Author Comment

by:xzay1967
ID: 38845678
Thank you for quick response, the Exchange version is 2007, this is actually SBS2008 with Exchage 2007 integrated. I ran your command which yielded the below result.

Identity             User                 AccessRights        IsInherited Deny
--------             ----                 ------------        ----------- ----
wtaylor.local/MyB... WTAYLOR\zay          {FullAccess}        False       False

So, I ran the export command again, and got


export-mailbox -identity "heather" -includefolders "\deleted items" -deletecontent

Cannot open the log file 'C:\Program Files\Microsoft\Exchange Server\Logging\Mi
grationLogs\export-Mailbox20130201-173858-1696191.log'.
At line:1 char:1
+  <<<< export-mailbox -identity "heather" -includefolders "\deleted items" -de
letecontent
    + CategoryInfo          : InvalidOperation: (:) [], InvalidOperationExcept
   ion
    + FullyQualifiedErrorId : 964C95C
0
 
LVL 9

Expert Comment

by:EMJSR
ID: 38845725
Does the user have Local Administrator rights on the client workstation?

Start > Run > control userpasswords2

Add the user if not listed, so the User Name corresponds to her user account and the Domain to your Windows domain name (you don't need to add .local or .com or w/e you have) and the Group should be Administrator.

You probably know how to do this, but I figured just in case!
0
 

Author Comment

by:xzay1967
ID: 38845876
The user has local admin rights to all the workstations. This is a real estate company so no user has a designated machine. The environment is sbs2008 with redirected folders enabled so the users' documents follows them to whatever workstation they log onto. I running the shell command on the server, so not sure how or where the user's local admin rights come into play. Not disputing, just trying to understand the logic.  I really need to get this done, cause right now when I run a get-mailboxstatistics <username> I get maildisabled for the status. I know this is due to her being well over her limit. I increased her mailbox for the time being so she can at least log on and manually delete her stuff. But I don't want this to the fix all be all method.
0
 
LVL 9

Expert Comment

by:EMJSR
ID: 38846005
The user admin rights come to play with anything you do in Outlook. For example in Outlook 2010 when you try and import old NK2 files using a command line trigger, unless the user has local admin rights, it won't work. We have done extensive testing in that regard.

But since that's not it, I'll have to get back to you.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 9

Accepted Solution

by:
EMJSR earned 500 total points
ID: 38846016
Is your server 64-bit? There were several articles that state that export like this only works on 32-bit systems. This may have been patched.

Also have a look through this article. It may still be a rights issue, but on another level:

http://technet.microsoft.com/en-us/library/bb266964.aspx

Also, when you export the mailbox and can specify a target folder, I would always go with a folder that is not governed by the OS, e.g. not somewhere in %programfiles%.

Another suggestion, is UAC turned off on the client machines and on the server?
0
 

Author Comment

by:xzay1967
ID: 38846050
I think I know what the issue is, I should be running this from a workstation rather than the server. After reading your comments, it dawned on me I shouldn't be doing it from the server. I will download and install the management tools and see how that works.
0
 
LVL 9

Expert Comment

by:EMJSR
ID: 38846124
Well that is a possibility. You could simply delete emails directly from her Outlook and/or export the PST from there, too.

I just didn't know which route you preferred and/or which kind of access you have. I do a lot of remote support, even though I'm in the same city as most of our clients. Always depends on your setup.
0
 

Author Comment

by:xzay1967
ID: 38846727
Yeah I could go the Outlook way, but I try to approach or resolve issues from an Admin stand point lol. I also like the challenge of using PS that way I can become better. I must be having a brain fart, cause I performed the same task some time ago, when I moved an entire office's email by exporting their pst using PS. Two partners fell apart, so when one left, some agents left with her, so I had to move their emails to the new office.
0
 

Author Comment

by:xzay1967
ID: 38846795
I ran the command from a workstation, and it ran flawlessly. I totally forgot that I needed to do that from the workstation.
0
 
LVL 9

Expert Comment

by:EMJSR
ID: 38847123
That's OK, believe me I've been there. It's the moment when you know how you have seen something before, but you can't quite pinpoint it.

Plus, while using command line is kinda fun (and a certain level of nostalgia) and while I understand Microsoft's desire to not make admin tasks all too accessible, so that not every Joe Shmuck can pretend to be a sysadmin, I do believe they could make the entire process a little less time consuming.

For example, how about mounting a mailbox store to the NTFS filesystem to either read and/or export/import. Backup software can do that, so... But hey.

Anyway, glad I could point you in the right direction!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now