Removing local Accounts from Servers

Job ID: 34636169

Budget: £250 – £750 GBP

Hello, I have a project to remove local accounts from Windows 2012, Windows 2016 and Windows 2019 servers that are not in the correct AD.
Basically what is happening users with local administrator privileges are creating local accounts on the servers, What i want is a script that will run every 15 minutes that will remove accounts that are not permitted.
The script will hopefully be written in C++ or maybe Powershell.