Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Searching Emails Throughout an Agency Sent to a Specific Domain

$
0
0

Good Afternoon!

I have a PowerShell command that I am trying to run to gather up some emails from our organization to a specific email domain. The script is:

Powershell
Search-MailboxIdentityuser@domain.com-SearchQueryTo:@another.domain.gov" -TargetMailbox admin@domain.com -TargetFolder _Folder

This does the job of returning any email sent from user@domain.com to another.domain.gov. It also adds a folder in the target mailbox with all the returned addresses.

The issue... I need the -Identity to be *@domain.com... I need to search through ALL of our email records, find any email sent from any user to @another.domain.com from the past 5 years.

I've been going round and round with Microsoft on the correct command to use, but it's been an hour and a half and I'm hoping there is a PowerShell guru out there that can possibly provide...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>