Zend certified PHP/Magento developer

How to delete all the emails in Outlook in all folders before a certain date?

I made a mistake importing some old emails into my Outlook, and now things are quite messed up. I want to delete all the emails I have in all Outlook folders before a certain date, let’s say DD/MM/YYYY. I tried both the Windows Outlook and the web-app, though only a limited number of search results are selectable in each round, which given the number of emails I have mistakenly imported, is a painstaking process to be done manually.

I did some searches to see if I can automate the process using PowerShell. I tried this page, for example, thought the search-mailbox cmdlet doesn’t to be available in my PowerShell environment. I also checked the documentation on this page though it is more confusing than helpful.

P.S. It is worth noting that I have admin rights on this machine with Windows 10 21H1 OS, Outlook 365, and Powershell 5.1.*.