Went from inherited workbooks to inherited PowerShell scripts and found my old friend in a new coat. -ErrorAction SilentlyContinue on half the cmdlet calls, 2>$null on the rest (just in case, presumably).

What makes it worse than it looks is how it meets try and catch. A catch only sees terminating errors, and most cmdlet failures are non-terminating, so a try around Get-Item on a missing path catches nothing unless that call says -ErrorAction Stop. People add SilentlyContinue to quiet the red text, wrap the whole thing in try, and believe they're covered. (They are covered the way a tarp covers a hole in the floor.)

Native programs are their own hole. $ErrorActionPreference doesn't look at their exit codes by default, so you check $LASTEXITCODE yourself, or on 7.4 and later set $PSNativeCommandUseErrorActionPreference = $true and let a nonzero exit become an error.

The fix I keep landing on is the VBA one. -ErrorAction Stop on the calls that can fail, one try around each, and a catch that says which failure it expected.