PDA

View Full Version : LAN shutdown help



diluzio91
09-01-2011, 07:27 PM
I'm trying to remote shutdown my desktop from my laptop and when i give the command

shutdown -s -m \\desktop

i get

desktop: access is denied (5)

Any idea what im doing wrong?

Fuganater
09-01-2011, 07:36 PM
Same username on both machines?

OvRiDe
09-01-2011, 10:26 PM
^ This.. and that it is an administrator on the box you are trying to shutdown, or the account exists on both machines and is an administrator.

You might check out PSShutdown as an alternate command. it allows you to specify user credentials in the command line. Its part of the PSTools suite but it is free to download from MS.

diluzio91
09-02-2011, 01:24 AM
rats, no, its a different username on the 2 machines.

I'll try PSShutdown

Silly question, but how do i install it?

OvRiDe
09-02-2011, 03:31 AM
They are just command executables so you don't need to install them.. just run them. So if you put them in a folder in the root of C: called PSTools. You would just type something like into your command line:

c:\PSTools\Psshutdown \\desktop -u deluzio -p -s -f

OR you could add the C:\PSTools to your path or just copy the PSTools folder to a location that is already in your path and then you would be able to just type psshutdown etc etc... I usually just copy it to the windows\system32 dir.