This example first gets all the mailboxes on database DB1 and then searches for items that contain the string "Virus message" in the subject line. It will export the items to the mailbox ExportMailbox and will delete those items from the source mailbox.
To find and delete items from a group of mailboxes, such as all mailboxes on a database, without exporting the items to another mailbox, run the following command:
This example first gets all the mailboxes on database DB1, searches for items that contain the string "Virus message" in the subject, and deletes those items.
To export data from all the mailboxes of users in the Marketing organizational unit, run the following command: