We have thousands of systems and delete them after not talking to sccm's heartbeat usually, but with that sccm keeps the computer in its database for 30 days or so. So when we push a patch/program we will have computers that are not getting it, because they no longer exists. I pull the listing of computers from sccm and then run them against Get-ADComputer in a script.
The script runs but i want the if statement to check to see if it is null else "blahh" and it does, but it sends the common error of unable to find the computer. I want it to check then go into my "if" statement not just display the error.