Merhaba,
Şöyle bir seneryo düşünelim. Bir mail var ve konusunda ne olduğunu biliyorsunuz veya kimin gönderdiğini hatta mailin içerisindeki sözcükleri tahmin edebiliyorsunuz.. Bu mail kimlerde var bulabilirsiniz bunu daha önceki yazımda anlatmıştım.
Multi Mailbox Search ile Tüm mailboxlar üzerinde Arama yapın.
Şimdi ise bulduğumuz sonuçları silmeyi anlatacağım.
Aşağıdaki komut çalıştırıldığında tüm mailboxlarda spuser’ın gönderdiği ve konusunda dest olan mesajları siler ve loglar
Tabi bu işlemden önce kendinize tüm mailboxlar üzerinde yetki vermelisiniz.
Get-Mailbox -ResultSize unlimited | Add-MailboxPermission -User kullanici-adi -AccessRights FullAccess -InheritanceType all
Get-mailbox | Search-Mailbox -SearchQuery ‘From:”spuser” dest’ -DeleteContent -TargetMailbox “Discovery Search Mailbox” -TargetFolder “AllMailboxes-Election” -LogLevel Full
Komutu detaylandırmak isterseniz aşağıdaki kaynaktan faydalanabilirsiniz;
This example searches the mailbox of Joe Healy and copies the search results to the DiscoveryMailbox in the folder JoeHealy-ProjectHamilton.
Search-Mailbox -Identity "Joe Healy" -SearchQuery "Subject:Project Hamilton" -TargetMailbox "DiscoveryMailbox" -TargetFolder "JoeHealy-ProjectHamilton" -LogLevel Full
This example searches April Stewart’s mailbox for messages that contain the phrase “Your bank statement” in the subject and logs the result in the SearchAndDeleteLog folder in the administrator’s mailbox. Messages aren’t copied to the target mailbox.
Search-Mailbox -Identity "April Stewart" -SearchQuery 'Subject:"Your bank statement"' -TargetMailbox "administrator" -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full
This example searches April Stewart’s mailbox for messages that contain the phrase “Your bank statement” in the subject and deletes the messages from the source mailbox.
Search-Mailbox -Identity "April Stewart" -SearchQuery 'Subject:"Your bank statement"' -DeleteContent
This example searches all mailboxes in your organization for messages that contain the words “election”, “candidate”, or “vote”. The search results are copied to the Discovery Search Mailbox in the folder AllMailboxes-Election.
Get-Mailbox | Search-Mailbox -SearchQuery 'election OR candidate OR vote' -TargetMailbox "Discovery Search Mailbox" -TargetFolder "AllMailboxes-Election" -LogLevel Full
http://technet.microsoft.com/en-us/library/dd298173.aspx

Senior IT Pro Trainer & Consultant focused on MS technologies relating to System Center Products SCCM, SCOM, SCO, SCSM