locked
Downsize Mailbox by Deleting E-Mails with EMS RRS feed

  • Question

  • Hello,
    I have a problem with Deleting E-Mails out of a Mailbox with EMS .  I am running the command:
    Search-Mailbox -Identity "Mailbox Name" -DeleteContent -SearchQuery 'received:01/01/2001..11/20/2011' -TargetMailbox "
    Backup Mailbox" -TargetFolder "Name" -LogLevel Full -Force -verbose
    Following error I get and the mailbox does not get resized:
    The items could not be copied.
        + CategoryInfo          : ReadError: (0:Int32) [Search-Mailbox], StoragePermanentException
        + FullyQualifiedErrorId : 2952493D,Microsoft.Exchange.Management.Tasks.SearchMailbox
    Does anybodz have an idea how I can handle this issue ?
    Thanks,
     
    Thursday, November 24, 2011 4:26 PM

Answers

  • Hi Marcel,

    I test the cmdlet in my test lab(Exchange 2010 SP1 RU6), and it works.

    Search-Mailbox -Identity "Mailbox Name" -DeleteContent -SearchQuery 'received:01/01/2001..11/20/2011' -TargetMailbox "Backup Mailbox" -TargetFolder "Name" -LogLevel Full -Force -verbose

    'received:01/01/2001..11/20/2011'  -> Change the Single quotas to quotation marks(" ").

    Please make sure you meet the Prerequisites to Use Mailbox Search to Delete Messages.

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

    Please try to run a simple Search-Mailbox to test. For Example:

    Search-Mailbox -Identity "April Stewart" -SearchQuery "Subject:'Your bank statement'" -DeleteContent

    Frank

    • Marked as answer by emma.yoyo Thursday, December 1, 2011 1:48 AM
    Monday, November 28, 2011 3:43 AM

All replies

  • Hi Marcel,

    I test the cmdlet in my test lab(Exchange 2010 SP1 RU6), and it works.

    Search-Mailbox -Identity "Mailbox Name" -DeleteContent -SearchQuery 'received:01/01/2001..11/20/2011' -TargetMailbox "Backup Mailbox" -TargetFolder "Name" -LogLevel Full -Force -verbose

    'received:01/01/2001..11/20/2011'  -> Change the Single quotas to quotation marks(" ").

    Please make sure you meet the Prerequisites to Use Mailbox Search to Delete Messages.

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

    Please try to run a simple Search-Mailbox to test. For Example:

    Search-Mailbox -Identity "April Stewart" -SearchQuery "Subject:'Your bank statement'" -DeleteContent

    Frank

    • Marked as answer by emma.yoyo Thursday, December 1, 2011 1:48 AM
    Monday, November 28, 2011 3:43 AM
  • Hi Marcel,

    Any updates?

    Frank

    Wednesday, November 30, 2011 8:21 AM
  • Hello,

    In my case the solution was to disable antivirus services on the mailbox server. The -DeleteContent option then work without problems. Exchange 2010 SP2 + CU1.

    Maybe it will be helpful for somebody.

    Dave

    Thursday, May 10, 2012 2:17 PM