Good morning all.
I am hoping that someone can assist with a powershell command or alternative.
What I am trying to do: I need to do a mailboxseach for a specific user. Specifically, I need all mails sent to email@example.com from all users in the same domain @domain.com
Example: find all mails from @domain.com to firstname.lastname@example.org
Currently I am using this command:
Get-Mailbox -Identity email@example.com -ResultSize Unlimited | New-MailboxSearch -MessageTypes Email -TargetMailbox firstname.lastname@example.org -StartDate 04/22/2018 -Name JournalExport -Senders *@domain.co.za -Recipients email@example.com
The above command works almost 100%, but there are still mails to the user from external domains. I only need internal emails.
Currently we have a gap in our internal journal (standard Journaling) and I am trying to fill that gap with the mails still in the mailbox.