Search-Mailbox delete emails sent to Distribution Group

 

When someone will send email to wrong distribution group you can easly delete this email using Search-Mailbox CMDlet.

All you need it’s to get distribution group members and run for each of them search-mailbox.

Below you can find example how to remove email sent to distribution group Important_DL     with subject Confidential Report.

Get-DistributiongroupMember Important_DL | Search-Mailbox -SearchQuery subject:"Confidential Report" -DeleteContent -Force:$TRUE

 

Above command will delete email with subject Confidential Report from users mailboxes which are members of Important_DL distribution group.

You can also use others attribute to define email properties to delete.

Below you can find more properties which you can use:

Continue reading

Search-Mailbox kind Advanced Query Syntax AQS

 

While you are using Search-Mailbox to find, delete or to copy items from mailbox you can use Advanced Query Syntax parameter to define what kind of items you are looking for.

Advanced Query Syntax  helps users to better define and narrow their searches.

Following AQS parameters we can use to narrow search:

  • File kinds: folders, documents, presentations, pictures and so on.
  • File stores: specific databases and locations.
  • File properties: size, date, title and so on.
  • File contents: keywords like “project deliverables,” “AQS,” “blue suede shoes,” and so on.

 

For Exchange Search-Mailbox CMDlet we can easily use following parameters from File kinds:

File Type:   Example 
 Contacts kind:contacts
 E-mail kind:email
 Instant Messenger conversations kind:im
 Meetings kind:meetings
 Tasks kind:tasks
 Notes kind:notes

Continue reading

Exchange 2010 Database size growing problem

 

When you have Microsoft Exchange 2010 environment you can have problem with Exchange database size growing.

This is common problem and mostly caused by Exchange 2010 mailbox dumpster.

But if you have problem with mailbox databases backup, then all items deleted by users and all deleted mailboxes will not be purged until backup will end successful.

If you check size of all mailboxes in Exchange 2010 mailbox database, the sum of mailboxes can be less than mailbox database size. Yes we know that mailbox database has AvailableNewMailboxSpace but you can check that sum of mailboxes size and size of mailbox database white space can be also less then size of .edb file.

You can find informations how to reduce Exchange database size by moving all mailboxes from database to new one, or to dismount database and use Eseutil to defragment mailbox database. You can also find all disconnected mailboxes in database and purge them.

We wrote about this in post:
Microsoft Exchange 2010 how to reduce the size of the database

You can find information on Microsoft Support Website An Exchange Server 2010 database store grows unexpectedly large that if you want to stop mailbox database unexpected growth you need to install Rollup 1 for Microsoft Exchange 2010 SP2.

Unexpected growth of Exchange 2010 mailbox database can be caused by using:

  • using jurnaling mailbox in Exchange 2010 environment
  • using a third-party email message archival system

This issue can occur if the Microsoft Exchange Information Store service does not remove the deleted messages from the database.

Unfortunatelly when you use third-party email message archival system like Symantec Enterprise Vault, all emails moved to archive are deleted from user mailbox but they still remain in dumpster.

When you install Rollup 1 for Exchange 2010 SP2 it will probably fix this problem but it will fix only problem with new data added to archive but not clean the dirty pages or whitespace from preexisisting databases. 

More information you can find on Symantec Support Website:
Archiving of an Exchange 2010 database does not generate the expected amount of re-usable whitespace

 

How to resolve Exchange 2010 database growth:

 

When you apply Rollup 1 for Exchange 2010 SP2 you need to check few mailbox databases properties to make sure that all retentions and Quotas are configured properly.

To check Exchange 2010 mailbox database items retention like Mailbox, Deleted items and EventHistoryRetention you need to run Exchange Mangement Shell (EMS) with command:

Continue reading