Access Denied when running shutdown command for a remote machine
There have been multiple blog posts about an “access denied” error message when running the command line shutdown command pointed to a remote workstation.
Example of Shutdown command:
- shutdown /m \\SOMECOMPUTER /t 5 /y /c “Your machine is about to be shutdown.” /s
There are a myriad of reasons this could happen….however a couple of the big ones:
- A user legitimately may not have access to the machine, not logged into the domain as a user with rights to shutdown the machine remotely
- Some have reported problems with this in varying states of “file and printer sharing” configurations on workstations
However, I would like to point out another often overlooked reason this error can happen. If there is a problem with the computer account in Active Directory, either the trust relationship has been broken or the computer account literally does not exist, an admin would receive the error message when trying to do a remote shutdown – “Access Denied.” In fact recently onsite with a client, we were remotely attempting to shutdown a couple of computer labs for image purposes and received this error. After investigating, the computer accounts had been deleted from Active Directory.