AJWhite1970 Posted May 23, 2013 Posted May 23, 2013 (edited) 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 Edited May 23, 2013 by AJWhite1970 Added version of Exchange
AJWhite1970 Posted May 23, 2013 Author Posted May 23, 2013 (edited) 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. Edited May 23, 2013 by AJWhite1970 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now