I need to delete emails from ONLY my INBOX that predate 1/1/17. I know the script:
search-mailbox -identity user -SearchQuery "Received:<$('01/01/2017')" -deletecontent
This works and deletes my email fine but I think it also deletes my: sent, deleted, and sub folder's emails as well. Any suggestions?