I am saving outlook attachments with PowerShell. I have followed all his instructions that he has written in his blog. Saving Outlook attachments with PowerShell - Mikey Bronowski - Blog
Also it is working.
Only thing I can’t figure it out how I used subject filter to filter certain emails will be downloaded as email attachments.
Do you have the modified code that you’ve tried? You can sanitise it to remove your e-mail address and any personal information.
Mail items have a Subject
Property so in the foreach ($email in $emails)
loop, you should be able to use something like Where-Object {$email.Subject -eq 'Test Message'}
to filter the messages by subject.
If you can clarify exactly how you’re trying to filter the messages and provide some example code, we might be able to help in a bit more detail.
When posting the code, please remember to use the pre-formatted text button </> and paste the code inbetween the backticks. It really helps us with readability and copying and pasting code for testing.