Pages

Tuesday, December 4, 2012

Delete Emails in Specific Mailbox or in Multiple Mailboxes from Exchange Server 2010



In order to find and delete a certain email from one mailbox or from multiple mailboxes you can perform the following steps
  • Click Start < All Programs < Microsoft Exchange Server 2010.
  • Right click on "Exchange Management Console", then click on "Run as administrator".
Now you opened Microsoft Exchange Management Console as administrator.  Type the command below and change blue text according to appropiate.

*   If you need remove a specific message from a mailbox: 

Search-Mailbox -Identity "User Name" -SearchQuery subject:"Email Subject" -DeleteContent
 
*   If you need remove a specific message from all mailboxes:
 

Get-Mailbox –Server “servername” –ResultSize unlimited | Search-Mailbox -SearchQuery subject:"Email Subject" –DeleteContent

  
If you receive the error “Search-Mailbox” Is Not Recognized as the Name of a cmdlet..., don't worry!!! This error will be generated if the snap-in has not been registered, for fix this error type the next command.
 
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
 
Now you can trying again. :)
 



No comments:

Post a Comment