We help IT Professionals succeed at work.

Remove a email for Exchange Online user

AXISHK
AXISHK asked
on
76 Views
Last Modified: 2018-10-30
A particular email need to delete from all my Exchange Online User. Any idea how to do this ?

Thx
Comment
Watch Question

IvanSystem Engineer
CERTIFIED EXPERT

Commented:
Hi,

here is the guide how to bulk remove email from accounts: https://docs.microsoft.com/en-us/office365/securitycompliance/search-for-and-delete-messages-in-your-organization

Regards,
Ivan.
Adam the 32-bit AardvarkSoftware Developer
CERTIFIED EXPERT

Commented:
Apart from ComplianceSearch-related cmdlets, you can also use Search-Mailbox with the -Delete switch. Here is a detailed guide on how to perform a bulk-delete action:
How to delete email from mailboxes on Exchange 2016 / 2013 / 2010 / Online
The most important part is to correctly set the -SearchQuery, so that you target the particular email and do not delete anything else. If you use the -EstimateResultOnly switch instead of "-Delete", you will be able to see how many items are targeted.
FOXActive Directory/Exchange Engineer
CERTIFIED EXPERT
Top Expert 2015

Commented:
Connect to o365 via powershell

Do you have for example the subject line of the email?  The below one liner will delete it from all of your o365 users mailboxes

Get-Mailbox -ResultSize Unlimited | Search-mailbox -SearchQuery 'Subject:"Bad Email on Deck"' -DeleteContent

Author

Commented:
Subject with non English chars can't be searched successfully. Do I need to install anything on my workstation ?


search-mailbox -identity johnlee -searchquery "Subject:答复:  请帮忙开通付兵的邮箱" -EstimateResultOnly
The property keyword isn't supported.
    + CategoryInfo          : InvalidArgument: (:) [], ParserException
    + FullyQualifiedErrorId : AAAC573B
    + PSComputerName        : mecmail1.mongolia-energy.com
Thx
Software Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.