Link to home
Start Free TrialLog in
Avatar of kastro
kastroFlag for New Zealand

asked on

DELETING A SPECFEIC EMAIL FROM ALL THE MAILBOXES IN EXCHANGE 2013

i have a situation where i need to delete a specefic email sent from a particular user from all the mailboxes in exchange 2013 .but the subject name of this email is in arabic and exchange power shell is not accepting that subject name,

please tell me the way to delete it
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

You'll probably need to add the arabic language pack to Windows for the system to recognize the language...That said, you should be able to use different search options like the sender's email address and/or the time the email was sent when performing the search with search-mailbox.
Avatar of kastro

ASKER

Please share the complete commands
get-mailbox | search-mailbox -searchquery "from:<email address> received:<date received>" -deletecontent

Open in new window


Should dig through all the mailboxes for emails sent by a specific sender and received at a specific time. Note that you would remove the <> characters when entering the email address and date
Avatar of kastro

ASKER

this command will delete all the messages which are sent by a sender on this date how to specify the time duration.moreover the email sent to a group email  which have 40 users .as i find in the delivery report that this email received for more than 40 users(Groupemail) at 2:30PM.
in this way i have to run this command for each user in this group email.
is there not any way to delete the email which is sent by this user to this particular group Email(it@xyz.com) at 2:30Pm on 09-13-2017
ASKER CERTIFIED SOLUTION
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kastro

ASKER

when i run the command i find the following deletecontent error message

[PS] C:\Windows\system32>Get-Mailbox xyz | Search-Mailbox -SearchQuery {from:abc.com AND Received:"09
/13/2017 13:09..09/13/2017 13:10"} -deletecontent

A parameter cannot be found that matches parameter name 'deletecontent'.
    + CategoryInfo          : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Search-Mailbox
    + PSComputerName        : xxx..com
Avatar of kastro

ASKER

ok find the solution

as i add the mailbox import export role to the organisation management and add my user in the member