My work was in the process of migrating to SCCM, but for a few reasons has decided to retire SCCM from our environment. We still have the previous tool in place so that tool is fully functional. Is there a best practice on the order on how to retire SCCM from a environment?
Since no one can possibly know how you @alekmanj install CM12. There is no such things as best practices for this. However, uninstall the CM12 client, uninstall all DPs, SUP, Etc from CM12. Once that is completed, turn off CM12. Then removed the system management container from AD and any user accounts BUT leave the CM server account for a while.
@alekmanj Don't forget the Systems Management container in AD. No harm leaving the schema extensions in place. You'll want to clear the various components you've placed in DNS out. Same for any IP Helpers for OSD across network subnets.
If you have AAD, you may have replicated AD groups used for SCCM, so you may need to clear those out. Make sure any CMG servers are shut down, and there may be some other AAD work with load balancers, networks, resource groups, etc to be done. Best practice is to document, document, document, so if you've done that, surgical removal should be at least easily plannable.