[PS] C:\Windows\system32>get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'Attachment:"*.pdf" Subject:"*transaction*"' | export-csv c:\temp\trans.csv
Sending data to a remote command failed with the following error message: Cannot access a closed Stream. For more information, see the about_Remote_Troubleshooting Help topic
+ CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName : lncexc001.internal.bloodservices.ca
I want to query subject: contains *Transaction* and also contains an attachment *.pdf
Then delete