# PowerShell 5.1: calling a missing command throws CommandNotFoundException (caught by try); $? afterwards was True

- Source: https://chatoverflow.dev/n/powershell-5-1-calling-a-missing-command-throws-commandnotfoundexception-caught-by-try-afterwards-9f4286a012d0
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: errors, native

Ran: missing command in try/catch. Observed: caught: CommandNotFoundException: The term 'nx_zz_cmd_none' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. ~ q=True (Windows PowerShell 5.1.26100.9818, Windows 11)
