+ Post New Thread
Results 1 to 2 of 2
Enterprise Software Thread, Exchanage 2010 Delete message from all users in Technical; Hi Exchange 2010 SP3 Just migrated from Ex2003 so in new territory and not up to speed with the PS ...
  1. #1
    AJWhite1970's Avatar
    Join Date
    Sep 2012
    Location
    Wiltshire
    Posts
    321
    Thank Post
    82
    Thanked 75 Times in 57 Posts
    Rep Power
    16

    Exchanage 2010 Delete message from all users

    Hi

    Exchange 2010 SP3

    Just migrated from Ex2003 so in new territory and not up to speed with the PS commands yet...

    Whats the quickest way to delete a message from all users in a database that has no subject or content other than a picture?
    All I have is the time it was sent....

    Cheers
    Andrew
    Last edited by AJWhite1970; 23rd May 2013 at 01:04 PM. Reason: Added version of Exchange

  2. #2
    AJWhite1970's Avatar
    Join Date
    Sep 2012
    Location
    Wiltshire
    Posts
    321
    Thank Post
    82
    Thanked 75 Times in 57 Posts
    Rep Power
    16
    OK, cracked it after some advanced Google work but I'll copy it here in case anyone else ever needs to know this in a hurry...

    Search for a subject on all mailboxes and send a full report to ICT user:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football" –Logonly –Targetmailbox curriculum\ict –Targetfolder Inbox -LogLevel Full

    Search for a subject on all mailboxes and delete from all mailboxes:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football" –DeleteContent
    (Answer A when prompted...)

    Search for content on all mailboxes using date and send a full report to ICT user:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football",”Sent:16/05/2013" –Logonly –Targetmailbox curriculum\ict –Targetfolder Inbox -LogLevel Full

    Search for content on all mailboxes using date and delete from all mailboxes:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football",”Sent:16/05/2013" -DeleteContent
    (Answer A when prompted...)

    Search for content on all mailboxes using date and from and send a full report to ICT user:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football",”Sent:16/05/2013","From:ajw" –Logonly –Targetmailbox curriculum\ict –Targetfolder Inbox -LogLevel Full

    Search for content on all mailboxes using date and from and delete from all mailboxes:
    get-mailbox -resultsize unlimited | search-mailbox -SearchQuery “Football",”Sent:16/05/2013","From:ajw" -DeleteContent
    (Answer A when prompted...)


    * The -SearchQuery string can be anything in the email including attachment name, html code, subject etc.
    Last edited by AJWhite1970; 23rd May 2013 at 03:43 PM.

  3. Thanks to AJWhite1970 from:

    joe90bass (19th December 2013)

SHARE:
+ Post New Thread

Similar Threads

  1. Exchange 2010 Recovering deleted messages
    By RabbieBurns in forum Windows Server 2008 R2
    Replies: 6
    Last Post: 6th September 2013, 12:29 PM
  2. Remove message from all users mail boxes Exchange 2010 sp1
    By ful56_uk in forum Enterprise Software
    Replies: 7
    Last Post: 14th March 2012, 03:50 PM
  3. Hide desktop icons from all users
    By Hightower in forum How do you do....it?
    Replies: 12
    Last Post: 29th March 2011, 09:10 AM
  4. Deleted the All Users folder by mistake...
    By Ambient in forum Windows Server 2000/2003
    Replies: 6
    Last Post: 2nd November 2009, 12:33 PM
  5. delete same folder from all users home area
    By markcuk in forum How do you do....it?
    Replies: 27
    Last Post: 25th April 2007, 10:38 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •