none
Delete emails from a specific folder in Exchange 2010 SP1 RRS feed

  • Question

  • Hi all,

     Since Exchange 2010 SP1 does not have “-DeleteContent” parameter in mailboxexportrequest any more, how do we delete emails from a specific folder of a user mailbox? (Personal folder, not default folders).

     

    Please note that the ASQ for searchquery in Search-Mailbox does not support “folder”.

     

    If going for retention policy, is there a way to tag a retention policy to a specific folder of a user mailbox without user attention?


    William Yang

    William Yang
    Sunday, November 27, 2011 3:27 AM

Answers

  • Hi William,

    Yes, you may not run the Search-Mailbox to delete items in specific folder at the moment. Hope it will be back soon.

    You can create a Personal tag, users can apply personal tags to folders they create. But users have to select related Retention Policy using Outlook or OWA manually.

    For more information, please see:

    Understanding Retention Tags and Retention Policies

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

    Frank Wang

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by emma.yoyo Monday, December 5, 2011 2:12 AM
    Monday, November 28, 2011 6:54 AM
  • Maybe this could be something that will help you?

    http://www.mikepfeiffer.net/2011/04/powershell-script-cmdlets-for-managing-e-mail-items-using-the-exchange-web-services-managed-api/

     


    Jonas Andersson | Microsoft Community Contributor Award 2011 | MCITP: EMA 2007/2010 | Blog: http://www.testlabs.se/blog | Follow me on twitter: jonand82
    Friday, December 2, 2011 10:43 AM
  • yes, I already gave up the “search-mailbox” command. This commandlet is too weak.

     

    To resolve this, I just wrote a PowerShell script with EWS managed API. Looks working well ~

     

    Ps, thanks for Glen’s excellent DEV blog.


    William Yang
    Sunday, December 4, 2011 10:14 AM

All replies

  • Hi William,

    Yes, you may not run the Search-Mailbox to delete items in specific folder at the moment. Hope it will be back soon.

    You can create a Personal tag, users can apply personal tags to folders they create. But users have to select related Retention Policy using Outlook or OWA manually.

    For more information, please see:

    Understanding Retention Tags and Retention Policies

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

    Frank Wang

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by emma.yoyo Monday, December 5, 2011 2:12 AM
    Monday, November 28, 2011 6:54 AM
  • yes, that is same as I got from Redmond ...

     

    thanks anyway

     


    William Yang
    Tuesday, November 29, 2011 3:56 PM
  • Maybe this could be something that will help you?

    http://www.mikepfeiffer.net/2011/04/powershell-script-cmdlets-for-managing-e-mail-items-using-the-exchange-web-services-managed-api/

     


    Jonas Andersson | Microsoft Community Contributor Award 2011 | MCITP: EMA 2007/2010 | Blog: http://www.testlabs.se/blog | Follow me on twitter: jonand82
    Friday, December 2, 2011 10:43 AM
  • yes, I already gave up the “search-mailbox” command. This commandlet is too weak.

     

    To resolve this, I just wrote a PowerShell script with EWS managed API. Looks working well ~

     

    Ps, thanks for Glen’s excellent DEV blog.


    William Yang
    Sunday, December 4, 2011 10:14 AM
  • Is it possible to have a look at your script ?

    Or sent me a copy to my snantel@gmail.com addr ?


    Friday, March 23, 2012 3:38 PM
  • Hello,

    I would be interested in how you set this up also.

    Thanks,

    Alex

    Thursday, March 27, 2014 6:32 PM
  • If possible, I would like to get a look at your script as well.  Thanks. 
    Monday, January 25, 2016 5:08 PM
  • Here you go. I upload the old code. https://gallery.technet.microsoft.com/Delete-emails-from-a-d7b7c416 Please note that you will need to install EWS API on the machine/server to run the script. http://www.microsoft.com/en-sg/download/details.aspx?id=35371

    William Yang

    Wednesday, January 27, 2016 6:26 AM
  • Cheers mate! Many thanks for this!
    Wednesday, September 13, 2017 8:54 PM
  • cheers~~

    William Yang

    Thursday, September 14, 2017 3:07 AM