e-matters
asked on
Remove all trace of emails from a domain user in Exchange 2010?
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the comments. All sorted.
Firstly I gave myself permissions:
New-ManagementRoleAssignme nt -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.
Firstly I gave myself permissions:
New-ManagementRoleAssignme
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
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.