In a normal Windows desktop session, if you see shutdown is not recognized as an internal or external command, check the Windows executable by its full path with /? first. In Command Prompt, use "%SystemRoot%\System32\shutdown.exe" /?; in PowerShell, use & "$env:SystemRoot\System32\shutdown.exe" /?. Help appearing means that executable can run, so investigate command lookup before trying a shutdown repair.
I'd keep the check to help output. A command copied with shutdown or restart switches can close your session, and a positive shutdown timeout implies forced app closure under Microsoft's shutdown command rules. Save open work before testing any command that changes the power state.
Identify the shell and the failure
Windows Terminal is the window that hosts a shell. Its tab might run Command Prompt or PowerShell; their path-variable syntax differs. An error mentioning “internal or external command” points to Command Prompt. “The term 'shutdown' is not recognized as the name of a cmdlet...” is the PowerShell version.
The commands below apply to a normal, running Windows installation. If you opened Command Prompt from recovery or installation media, use the recovery branch before changing any environment settings.
| What you see | Next check |
|---|---|
| Full-path help works; the short name fails | Inspect command resolution and the search path. |
| It works in a new shell but fails inside an app or script | Check the app or script, its environment and command name. |
| The full Windows path cannot be found | Confirm the current environment and preserve the exact error. |
| The command runs, but Windows hangs while shutting down | Use the shutdown-hang checks; command lookup has passed. |
Check the Windows executable without shutting down
Open Command Prompt or PowerShell from Start and enter the matching command exactly as shown, including quotes. These are documented command examples; the Windows executable's /? option displays help.
Command Prompt:
"%SystemRoot%\System32\shutdown.exe" /?PowerShell:
& "$env:SystemRoot\System32\shutdown.exe" /?PowerShell needs the call operator & to invoke the quoted executable path. It also doesn't automatically run a program from the current folder: an explicit path or .\ is needed when that location isn't on PATH. Microsoft's command-precedence explanation covers both rules. Changing folders to System32 and typing the bare name isn't an equivalent PowerShell check.
If help appears, keep that observation separate from whether the PC can shut down successfully. The explicit path bypasses short-name discovery; it doesn't prove which environment entry is wrong. If you see Access denied or a different error, record that text and stop applying a missing-PATH fix to it.
Inspect what the short name resolves to
In Command Prompt, inspect the current path and locate matching executable names without launching them:
path
"%SystemRoot%\System32\where.exe" shutdown.exe
"%SystemRoot%\System32\where.exe" shutdownThe where command searches the current directory and PATH. Without an extension it also uses PATHEXT. Supplying the full path to where.exe avoids depending on the same PATH you're investigating.
In PowerShell, inspect discovery and the current PATH:
Get-Command -Name shutdown,shutdown.exe -All
$env:Path -split ';'A missing-name error here is useful evidence. PowerShell can have an alias or function that takes precedence over an executable; -All exposes matching commands that a single result could hide. Check whether the application result points to the Windows System32 directory. Don't run an unfamiliar match from another folder just to see what it does.
If shutdown.exe resolves correctly but shutdown doesn't, preserve both results. An extension-search or name-conflict issue needs investigation rather than another System32 entry. I wouldn't replace PATHEXT with a list copied from someone else's PC.
Repair only a confirmed missing PATH entry
Use this branch when full-path help works and the active PATH is missing the Windows System32 directory. An expanded entry such as C:\Windows\System32 can already cover %SystemRoot%\System32 on a PC whose Windows directory is C:\Windows. Don't add a duplicate just because the spelling differs. If you can't tell whether two entries name the same directory, keep the original values and have IT inspect them.
Before editing, save the existing user and system PATH values privately. They can contain account names and work locations. On a managed PC, ask IT to check the configuration. Replacing the entire list can break other applications; change only an established missing entry.
- Open the Windows system environment settings: search Start for Edit the system environment variables, then choose Environment Variables on the Advanced tab.
- Inspect Path under System variables and select Edit. If you aren't authorized to change system settings, stop here.
- If neither an equivalent expanded path nor
%SystemRoot%\System32is present, select New and add%SystemRoot%\System32as a directory entry. Don't addshutdown.exeto the directory name. - Leave other rows and their order intact. Select OK to save the edit and close the settings dialogs.

Microsoft documents persistent environment changes and process inheritance: the current process has its own environment, constructed from the system and user scopes. If the saved system entry already exists but the running shell lacks it, investigate the parent process or app configuration instead of adding another copy.
Close the terminal application completely and reopen it from Start after saving work. Close and reopen an affected editor or launcher too; a new tab inside an old process may retain its environment. Inspect resolution again, then use shutdown.exe /? and shutdown /? only once those names resolve to the intended Windows executable. If a fresh sign-in is needed to refresh the launching environment, save work first.
If the narrow addition doesn't change the result, remove only the row you added, using your saved values to confirm the original list. Reopen the app and keep the failed comparison for support. Don't reset the whole PATH or copy third-party programs into System32.
If only an app or script fails
First compare the same help-only check in a newly opened shell. If it works there, don't assume the Windows file is missing. The app might have inherited an older PATH, supplied its own environment, or resolved another command with the same name.
A PyWhatKit issue from a Windows 7 user reported the error both in the library and in Command Prompt. Maintainers suggested a missing executable or path problem; the thread doesn't establish a completed repair. By contrast, the original poster in a Windows 11 PowerShell discussion said the full System32 path worked after the short command failed. I'd use that contrast to decide whether to investigate Windows command discovery or the app that calls it.
Use the discovery results above to check for a script named shutdown.cmd or shutdown.bat in the working directory. In Command Prompt, the current directory is searched before PATH directories, so a same-name wrapper can intercept the intended command. A script-versus-manual-command discussion identifies this collision as a possible self-invocation problem.
If it's your own wrapper, rename it to a distinct name and use an explicit Windows executable path in its approved configuration. For a packaged app, send its vendor the error and discovery results. Don't edit or delete an unfamiliar script, or repeatedly run a wrapper that might schedule a shutdown.
If you're in recovery or Windows Setup
A prompt opened from recovery or installation media is a separate environment. Microsoft describes Windows PE as a small deployment and repair operating system; it isn't the normal installed Windows session. Available tools and paths depend on that environment.
If you know you're in recovery, stop the normal-Windows PATH procedure. Don't assume the installed Windows drive is C:, add its system folder to the recovery PATH, or copy its shutdown executable into the recovery image. Return to the recovery interface and use the supported option for your actual task. The startup recovery guide explains the repair route and BitLocker precautions when Windows won't start.
Verify discovery, then follow the right repair
The lookup problem is resolved when a fresh intended shell finds the correct Windows executable and its help appears using the short name. That result doesn't require powering off the PC. If discovery still fails, give support the shell, whether you're in normal Windows or recovery, the full error, and the full-path versus short-name results. Share environment values privately and redact unrelated account or company paths.
If the Windows executable cannot be found in a normal running installation, don't download a replacement EXE from a file site. Use a trusted Windows repair or IT route with the exact error; adding a search directory won't restore a missing file. If discovery succeeds but the actual power operation hangs, continue with Windows 11 stuck on Shutting down. The startup and recovery hub groups the other failure stages.


