1

I am trying to shutdown one computer from another. I am logged in the administrator account, but when I run

Shutdown.exe \m \\Computername

or

Shutdown.exe /i and then select the remote computer. It comes back with the error:

Error: Access is denied(5)

1
  • 2
    This is not a programming question. It's an operating system question, and is off-topic for StackOverflow. The FAQ has more info about what types of questions should be asked here; you may want to review it. (And just for future reference: SHOUTING MAKES YOUR QUESTION HARDER TO READ, and doesn't improve your chances of getting help. There's a shift key (actually two of them, one for each hand) on your keyboard for a reason - properly using them will make your text more readable. '!!!!!!!` characters don't improve things, either.)
    – Ken White
    Sep 8, 2012 at 2:03

3 Answers 3

3

The problem is in this part: I am logged in the administrator account.

There is no the administrator account, there are accounts with administrative priveleges.

Consider the following:
Company A has CEO_A.
CEO_A calls another firm, lets say company B, and tell then to sell stock.
B: responds with “Heck no. We do not follow order from you. Your title might be CEO but you are CEO of Company A and not from us. We only listen to our own CEO's".

You are logged in administrator on computer A.
You tell computer B to shut down.
B responds with the same "Heck no" since you are not logged in as administrator on B.

For this to work you need:

  • Either some account which has administrative rights on the target computer.
    For ServerFault I would expect this to be done via AD and via policies. (Then again, this question came from stackoverflow and probably should have been moved to superuser, not ServerFault.).
  • The same username and password on the target computer (which would be a very bad habit, using the same password on multiple machines).
0

You need to either authenticate against the remote machine or use a pre-existing trust relationship between them (such as both computers being in the same Active Directory domain and you having the privileges to remotely shut down that machine).

I'm guessing your machines are not part a domain, just a workgroup. In that case it'll only work if the Administrator accounts on both computers share the same password (silly, but that's how it works in Windows). You can test this by being able to access the hidden Administrative SMB shares (\\server\C$ etc) in Windows Explorer without having to enter a username/password.

0

When the normal shutdown that comes with Windows doesn't work for me, I've had better luck with psshutdown.

SysInternals - PsShutdown

Also, be sure to look at @Dai's answer. If the passthru authentication isn't working because the admin account you are using isn't also an admin account on the other computer (with the same password), then you will have to provide the username and password on the command line when you run the shutdown command.

You must log in to answer this question.