#TodayILearned that for #Powershell’s Get-ADUser, using -identity will return an error:

$ $ErrorActionPreference = 'Stop'
$ try {Get-AdUser -identity phineas.fogg} catch {"In catch"}
In catch

….whereas using -filter won’t

$ try {Get-AdUser -filter {samaccountname -eq 'phineas.fogg'}} catch {"In catch"}
$