We're trying to clean up roaming profile folders, and as part of the task I need to check whether the user actually exists in AD. I have tried 3 different methods and so far none of them work.
Either the empty result of the search doesn't equal $null (e.g. If ($objUser -eq $null) resolves to false) or Powershell crashes (like when I try to run that If statement). So is there an AD User equivalent to Test-Path?
RF