?
Solved

Remove all trace of emails from a domain user in Exchange 2010?

Posted on 2016-10-28
4
Medium Priority
?
71 Views
Last Modified: 2016-10-31
Hi,

We have to remove all traces of a user from Exchange 2010. Can anyone recommend the best way of doing this?

Once the mailbox has been deleted through Powershell, we'd also need to delete any emails that others in the same Exchange database have received from the user in question, and also sent to the user in question.

Thanks.
0
Comment
Question by:e-matters
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
Ivan earned 1000 total points
ID: 41864151
Hi,

if you want to search all mailboxes, then you need to use multi-mailbox search function.

Take a look at this MS article about it: https://technet.microsoft.com/en-us/library/dd298173(v=exchg.141).aspx

Command should be: Get-Mailbox | Search-Mailbox -SearchQuery 'from:user@domain.com' -DeleteContent

I would run it first, with -WhatIf command, to make sure it will do what is required
Get-Mailbox | Search-Mailbox -SearchQuery 'from:user@domain.com' -DeleteContent -WhatIf

Regards,
Ivan.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 41864221
Looking forward to reading about this court case in the news, by the way.  I hope you don't end up being the one on trial!
0
 
LVL 31

Assisted Solution

by:Scott C
Scott C earned 1000 total points
ID: 41864314
One thing to keep in mind is that if any of the users are using .PST files for archiving, and any of these unwanted emails are in those files/folders then you'd have to be sure to search and scan those as well.  Also, any individually saved emails will have to be manually found.

And don't forget if any of those emails were printed and there is a hard copy.

Flash drives, external media, etc.....
0
 

Author Closing Comment

by:e-matters
ID: 41867307
Thanks for the comments. All sorted.

Firstly I gave myself permissions:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User myusername

Then I ran the following commands:

Get-Mailbox | Search-Mailbox -SearchQuery "from:foo@bar.com" -DeleteContent

Get-Mailbox | Search-Mailbox -SearchQuery "to:foo@bar.com" -DeleteContent

At first I got the following error, which other also seem to have had, and which prompted the initial request for help:

"The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
 + CategoryInfo : InvalidArgument: (User:PSObject) [Search-Mailbox], ParameterBindingException
 + FullyQualifiedErrorId : InputObjectNotBound,Search-Mailbox" for every mailbox.

This was because I was in the same Exchange Shell Window and the permissions change I did hadn't obviously been applied (Doh!). New Exchange Shell window was needed.

Mailbox was then removed. No PSTs in place.  Exchange tidied up and 16Gb of space freed up in the store.

No legal issues - the "user" was a temporary Sharepoint site.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question