Solved

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

Posted on 2016-10-28
4
66 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 250 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 250 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
how to add IIS SMTP to handle application/Scanner relays into office 365.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 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