What's your Exchange server version? Do you want to use powershell to search for messages with attachment sent from a distribution group?
Generally we could use search-mailbox command to search mailbox and copy the results to a specified target mailbox.
-SearchQuery "from:XXX"
However, for the attachment, I'm afraid you can only search for a specific atttachment, but cannot filter mails with attachments.
In Exchange online, has an filter HasAttachment in New-ComplianceSearch
Below is a related thread discussed about the similar issue: use Search-Mailbox to find messages with attachments
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.