Windows remote shutdown: access denied

remote controlshutdownwindowswindows 7windows-vista

I have 3 "client" computers, on which the mentioned user is administrator:

CPU1: Win Vista 32-bit -- User: Domain\User1    -- IP: 192.168.42.1
CPU2: Win 7 64-bit     -- User: localhost\User2 -- IP: 192.168.42.2
CPU3: Win 7 64-bit     -- User: Domain\User3    -- IP: 192.168.42.3

And a "target" computer (the one that I want to shutdown from the three others):

TGT: Win 7 64-bit      -- User: localhost\User4 -- IP: 192.168.42.21

I'm trying to shutdown TGT with the following command:

shutdown /s /m \\192.168.42.21

It's working from CPU1 (meaning TGT shuts down), but from CPU2 and CPU3 I get the following message:

Access denied. (5)

What am I to understand? What should I do to get it working form all of my computers.

Best Answer

One thing to keep in mind is that, the computers you want to shutdown must be on the same network as the "controlling" computer.

There are many solutions to this, I simply chose this one.
This is a simple network access issue. You will have access to certain computer some times, but that is not this case. To gain access of another computer for you to remote shutdown, you must execute the follow command in command prompt:

net use \\Server\IPC$ pswd /USER:user

Replace Server with the computer ip/name you want to shutdown remotely, pswd with the password to any administrator account of the remote computer and user with the Administrator user account name. To list all the computers in your current Wi-Fi network, do net stat. It'll give you the names of the computers. Unless you prefer an easier way: Click Start, then Right-Click Computer. Click properties, it should be named in there. IPC$ is supposed to be there. Sometimes it will not work. I do not know why.

Work cited here.

For example, we'll have a computer named CHOCOLATE, and an Administrator account on the current machine is Bob and the password is Joe:

net use \\CHOCOLATE\IPC$ Joe /USER:Bob
Related Question