Windows remote shutdown: Access is denied. (5)
"Good day, everyone. I have a PC that I want to shutdown remotely through the command line, however when I type "shutdown /s /m server name," I receive the message "Access is denied" (5). Does anyone know how do I fix the "Access is denied (5)" problem for remote shutdown? Any recommendations would be much appreciated."
How do I fix remote shutdown Access Denied?
To bypass "Access is Denied (5)" in CMD when remotely shutting down a PC, consider the following two recommendations.
- Ascertain that you have administrator privileges on the target PC. To remotely shutdown the PC with CMD, you must first ensure that you have appropriate local privileges to do so.
- Ascertain that two PCs are connected to the same network. You should also ensure that the machines you wish to shut down are on the same network as the "controlling" computer.
Solution 1. Run the “Net Use” command line in CMD
The reason for receiving "Access is denied (5)" is that the shutdown was not authorized. We can authenticate and then restart the shutdown command line by running the "Net Use" command line.
Step 1. On the remote PC, search "cmd" in the search box, and then right-click on it, choose “Run as administrator”.
Step 2. Enter the form of the following command line:
Pay attention: Replace “Server” with the IP address or username of remote PC, “pswd” with the password and “user” with the Administrator local user account name.
For example net use \\192.168.66\IPC$ 12345 /USER: VIVIAN-PC
Step 3. After that, run shutdown command line again to see whether the issue remains.
Solution 2. Enable UAC remote restrictions
The shutdown command line does not work unless the policy “LocalAccountTokenFilterPolicy” is enabled on the remote PC. Therefore, we can set the UAC on the remote PC to check whether it can fix the issue.
Step 1. On the remote PC, press Win + R and then type in “regedit”, and then press the “Enter” key.
Step 2. Navigate to:
Step 3. Find the registry key “LocalAccountTokenFilterPolicy”, if it doesn’t exist, you can do it as follows. On the right pane, right-click and then select “DWORD Value”.
Step 4. Copy and paste LocalAccountTokenFilterPolicy as the name and press the “Enter” key.
Step 5. Double click on the value, and then in the Value data box, type 1 and then select "OK".
Note: “0” means that the administrator credentials are removed.
“1” means that the value builds an elevated token.
Solution 3. Get shutdown permission
We have mentioned that if the local PC doesn’t have rights, then the remote shutdown can’t be completed. Therefore, we can add the user so that we can fix “shutdown remote computer CMD Access is denied (5).”
Step 1. Press Win + R and then enter "secpol.msc", and then hit “OK”.
Step 2. Navigate to: User Rights Assignment > force shutdown from a remote system
Step 3. Double click on “Force shutdown from a remote system” and then click on “Add User or Group...”
Step 4. Add the user like "Everyone" to "Force shutdown from a remote system", and then click on “Apply” and “OK” in turn.
AnyViewer: Shutdown remote PC with little effort
Now you must know the ways to fix “Access is denied (5)” in CMD when you shutdown the remote PC. But if the issue remains or you are seeking a more convenient way to shutdown the PC, we recommend you to use a professional remote access software-- AnyViewer to help you shutdown PC successfully.
AnyViewer not only allows you to enjoy easy operation and fast connection but also provides many shortcuts for you like CMD, Task Manager, Shutdown and so on, which can make the shutdown of remote PC easier. And you can shutdown the remote PC even though 2 PCs are not on the same LAN. Apart from using a PC to shutdown a remote PC, AnyViewer can also let you shutdown the PC with iOS devices.
Download AnyViewer on your PC and follow me to know how to operate.
Part 1: Shutdown PC with PC
Step 1. Install and launch AnyViewer on both computers. Go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)
Step 2. Fill in the signup information.
Step 3. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you've logged in to.
Step 4. Log in to the same AnyViewer account on the two devices, then click Remote control to achieve unattended remote access.
Note: You can also upgrade your account to Professional or Enterprise edition to assign more devices and to connect to another computer in privacy mode.
Step 5. Then you can either shutdown the computer from the start menu or from Operation.
Part 2: Shutdown PC with an iOS device
Step 1. Download the AnyViewer iOS app and AnyViewer for Windows above.
✎ On your iPhone:
Step 2. On the PC, find the position of "Settings" and the device ID. Click on Settings > Recipient > Set my security code, and then type in the security code, click on “OK”.
Step 3. Open AnyViewer on your iPhone, enter the device ID of the PC, and then click on “Connect”.
Step 4. Choose “Security code” on the iPhone.
Step 5. Input the security code and then the connection will be established.
Step 6. Click on the menu button on the right of the corner.
Step 7. Then you will see an option called “Power Management” on the right of the corner, click on it.
Step 8. Choose “Shut down” and then select “OK” for the Tips. And now the remote can be turned off.
From the solutions above, you must know how to fix “shutdown remote computer CMD Access is denied (5)”. But if the issue remains or you get tired of those limitations, you can try a free remote access software--AnyViewer to help you easily shutdown the remote PC.