#Assign the role to the required user account\nNew-ManagementRoleAssignment -Role "Mailbox Import Export" -User administrator\n#Restart the shell\n#This would search every mailbox for messages containing the word secrets in the message body,\n#and export them to the administrator mailbox in a subfolder called Export\nGet-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery "Body:'*secrets*'" -TargetMailbox administrator -TargetFolder Export\n#Or, to search one mailbox for bob smith\nSearch-Mailbox -Identity bsmith -SearchQuery "Body:'*secrets*'" -TargetMailbox administrator -TargetFolder\n#you can also do this via ECP\n#see http://technet.microsoft.com/en-us/library/dd298014.aspx