Cara Delete Spesifik Mail dari All User Mailbox di Exchange 2010
Untuk mengeksekusi perintah delete mail di server exchange, account yg bersangkutan harus member dari Discovery Management Role dan member dari Mailbox Export Import, dan Administrator secara default juga tidak mempunyai role tersebut. Jadi harus kasih dua role diatas dulu untuk account yg ingin mengeksekusi perintah delete yg dimaksud.
ADD Discovery Management Role
Add-RoleGroupMember "Discovery Management" -Member "User Name"
Hal di atas bisa juga dilakukan via GUI;
Server Configuration - Client Access - Exchange Control Panel - Properties, dapatkan url GUI
login via web GUI, add user as member of Discovery Management
ADD Mailbox Import Export Role
New-Managementroleassignment –Role “Mailbox Import Export” –User “Administrator”
Tutup shell dan re-open lagi agar command dapat digunakan,
Test delete satu mail dulu, contoh;
Get-mailbox | search-mailbox –searchquery "Subject:"virus"" –Logonly –Targetmailbox administrator –Targetfolder Inbox
Klo sudah berhasihl dapat dilakukan untuk semua mailbox,
Get-mailbox | search-mailbox –searchquery "Subject:'virus'" –DeleteContent -Force
Ref:
http://careexchange.in/deleting-a-specific-email-from-entire-organization-in-exchange-2010-2/
http://careexchange.in/discovery-search-simplified-script-exchange-2010/
http://technet.microsoft.com/en-us/library/dd298173.aspx