shutdown.exe Access is denied.(5)

Burtsev, Dmitriy (MOCS) 26 Reputation points
2021-09-01T21:14:22.713+00:00

Hello All

I am a local admin on the server.
Windows Server 2019 Version 1809 OS Build 17763.2114
shutdown.exe /s /t 600 /c "Script Done" /d p:0:0
Access is denied.(5)

I am running the script locally on the server. The script should shut down the server when done.
Get Access is denied.(5)
I try to run shutdown.exe locally from command prompt - Access is denied.(5)

Windows for business | Windows Server | User experience | Other
{count} vote

Accepted answer
  1. Anonymous
    2021-09-01T21:29:36.327+00:00

    Try again but running with elevated credentials.

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2021-09-02T11:35:38.327+00:00

    Hello,

    Thank you for your question.

    Other Note, are trying shutdown remotely ? if yes then you might need to adjust Local GPO settings as below

    You need to have “Force shutdown from remote computer” permissions for your account on the computer you’re trying to restart.

    Go to run -> type in: secpol.msc -> local policies -> User Rights Assignment -> force shutdown from a remote system, add your account to it…this works best if you’re attached to a domain so that both computers know what the account is.

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    0 comments No comments

Your answer

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