Hello,
There is no need to use scripts to delete objects (including computers) from AD. You can just do that manually in the Web interface or the Administration console. Alternatively, you can use a custom command or scheduled task with the corresponding action. The following tutorial will be helpful: https://www.adaxes.com/help/DeleteInactiveComputers.
As for deleting a computer from SCCM, it might be possible using a PowerShell script. Unfortunately, we do not have anything like that.