Share via

How to shutdown from cmd.exe

Hollis Alexander 20 Reputation points
2026-02-25T01:36:33.0566667+00:00

C:\Windows\System32\shutdown.exe /r /p /t 000

This command doesn't shutdown computer but returns message "failed to get retrieve reasons". What are retrieve reasons?

Windows for home | Windows 11 | Input and language
0 comments No comments
{count} votes

Answer accepted by question author
  1. Q&A Assist
    2026-02-25T01:36:38.6433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message "failed to retrieve reasons" typically indicates that the system is unable to access the shutdown reason codes that are necessary for the command to execute successfully. This can happen if the system does not have the appropriate permissions or if the shutdown reason codes are not configured correctly in the system settings.

    To resolve this issue, you can try the following steps:

    1. Run Command Prompt as Administrator: Ensure that you are running cmd.exe with administrative privileges. Right-click on the Command Prompt icon and select "Run as administrator."
    2. Check Group Policy Settings: If you are on a networked system, group policies may restrict access to shutdown reason codes. You may need to consult with your system administrator.
    3. Configure Shutdown Reasons: You can configure shutdown reason codes in the Local Security Policy under Local Policies -> Audit Policy. Ensure that the appropriate reasons are enabled.
    4. Use Different Flags: If you are not specifically needing to provide a reason, you can try using the command without the /r and /p flags to see if a simpler command works, such as shutdown /s /t 0 for a shutdown without restart.

    If these steps do not resolve the issue, further investigation into system logs may be necessary to identify any underlying problems.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Gunasekar N 61,365 Reputation points Independent Advisor
    2026-02-25T02:25:41.3066667+00:00

    Hello, thank you for reaching out to Microsoft Q&A.

    To restart your computer: (Immediately)

    shutdown /r /t 0
    

    To Shutdown your computer (Immediately)

    shutdown /s /t 0
    

    Your command - C:\Windows\System32\shutdown.exe /r /p /t 000 - has incorrect parameters.

    where /P cannot be combined with /r or /t.

    /r is for restart, and /p is turn off immediately. You cannot combine these two in a single command. and /t is for time delay. This is the reason why you got failed to get retrieve reasons error as the output.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.