I'm trying to write a PowerShell script using MSGraphConnector to find specific emails by their subject line and then delete them from mailboxes. However, I'm running into an error when using Connect-MgGraph: it says it can't bind the 'ClientSecretCredential' parameter because it can't convert my secret key string into the required type. I've spent too long on this and figured there must be a better way to do it in Exchange. I don't have Defender for Office 365. Can anyone assist me?
3 Answers
You can actually use Purview Content Search for this. It’s a solid way to search and manage emails without needing to dig too deep into PowerShell.
If you're scripting, using the dedicated PowerShell cmdlets for Purview content searches is likely the simplest approach. Otherwise, just hop on the Purview website for guidance on how to search mailbox data.
Honestly, I’d skip PowerShell altogether for this. Just go with eDiscovery; it’s much easier to handle.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures