all the computer in SCCM put them in a variable do a for each and ask AD if the
computer is found and active. If not delete it form SCCM.
$computers = (get-cmdevice).name
foreach ($computer in $computers)
Get-ADComputer -Identity $computer -ErrorAction Stop >$null
write-host “$computer is not in AD”