Get-mailbox -database 'DB1' | export-mailbox –SubjectKeywords "TEST Subject" -TargetFolder "TEST DATA" -TargetMailbox Administrator –DeleteContent
Select allOpen in new window
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent
Open in new window
And ensure that you have the correct permission as per the following article: http://www.kevintaber.com/2009/06/09/search-for-and-delete-emails-in-exchange-2007-mailboxes-using-powershell/
Hope this helps!!