Security & Compliance Explorer-esque Searching via Powershell?

Good Morning Everyone,

Is there a way to perform the same functions as the O365 Security & Compliance Explorer Screen in power shell? There’s many times I would love to pull a list of email in power shell to get a list of impacted addresses and use that information.

For instance, if I’m trying to block an incoming address, I want to be able to pull a list of users who received email from that address so I can then add that address to their Blocked Senders List.

Alternatively, is there a clean way to export from Security & Compliance to perform the same task?