https://www.configmgrblog.com/2013/01/25/how-to-cleanup-in-ad-deleted-devices-via-powershell-in-configmgr-2012-sp1/
How to cleanup in AD deleted devices via Powershell in ConfigMgr 2012 SP1