Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Dave, I would love to but some genius will complain about how my code did whatever to their device. So I will pass. But here is all the info you need. Basically write a simple script to delete the folders and registry keys listed for your version of office. Also the activation document is great, wrote a script for that one too. If all else fails you can try REVO uninstaller? https://www.revouninstaller.com/
https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state https://support.microsoft.com/en-us/office/manually-uninstall-office-4e2904ea-25c8-4544-99ee-17696bb3027b Have not tried this one
https://www.microsoft.com/en-gb/download/details.aspx?id=103391