Exchange 2013 - Search all servers for specific attachment

So... I need to locate all instances of an email that contain a specific email attachment (message-id204.doc) in my Exchange 2013 environment. I have 6 Mailbox Databases and wanted to see if we can get some kind of report on who received it, then possibly delete the attachment on the back end.  

I'm trying     Get-mailbox -database 'DB1' | export-mailbox –AttachmentFilenames "message-id204.doc" -TargetFolder "InfectedAttachment" -TargetMailbox "QuarantineMBX"  

and receive the following error;

export-mailbox : The term 'export-mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ Get-mailbox -database 'DB1' | export-mailbox –AttachmentFilenames "* ...
+                                ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (export-mailbox:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Thanks in advance.
Christian HansUndecided... Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
are you running it from powershell or the exchange management shell?  need to use the exchange management shell
Amit KumarCommented:
Please try below one and also go through with this article

Get-mailbox -database 'DB1' -resultsize "unlimited" | Search-Mailbox -Identity "April Stewart" -SearchQuery 'Subject:"Your bank statement"' -TargetMailbox "administrator" -TargetFolder

Mailbox export powershell to export mailbox to an PST not for moving particular e-mail to any mailbox.
Jeff GloverSr. Systems AdministratorCommented:
You might try in-place ediscovery and hold. It is in the Exchange Admin center. If you do not want to use that, you can use the following. In theory it should work. Worked when I tried it.
Get-Mailbox -Resultsize unlimited | Search-Mailbox -SearchQuery "attachment:name"  -TargetMailbox "mailbox to copy data to" -Targetfolder "Folder in that mailbox" - Logonly.

it should write a log to the folder specified and give you an output in Powershell.

As for deleting the attachment, no but once you ahve found wher the message is,  you can delete the whole message by using the -deletecontent switch.
 Search-Mailbox -identity "user" -SearchQuery "attachment:name"  -Deletecontent

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.