Such a simple command. But a bit nerve racking coz it doesn’t have much options and you wonder if it will somehow remove your entire domain and not just the DC you are targeting. :)
Uninstall-ADDSDomainController
You don’t need to add anything else. This will prompt for the new local admin password and proceed with removal.