Remotely Shutdown/Restart PC's at night
We've been looking at ways to do this to save power/rollout software and to stop problems with files being skipped when our backup runs (due the users leaving themselves logged on all night with documents open). That and it'll stop people from leaving desktop PC's up for months without ever rebooting them!
We've looked at using sysinternals PSShutDown running as a script from the server/locally and also considered deploying a scheduled task to the client workstations (via wininstall) but wondered if anyone else had any suggestions for the best way to go about doing this?
Re: Remotely Shutdown/Restart PC's at night
I just use SHUTDOWN.EXE in a batch file, via scheduled task.
For remote startup I enable WOL on the PCs and use a utility wol.exe plus batch file which interagates a CSV file with the PCs MAC addresses. You can the run the script to wake up different groups of computers.
If you want a copy, let me know :D
Re: Remotely Shutdown/Restart PC's at night
I recently started using the PSShutdown tool.
It appears to be working ok but I have noticed a problem with one pc.
If for whatever reason Windows XP trys to syncronise offline files and it fails to complete the task for any reason it leaves the pc on displaying the error but other than that it works fine here.
Re: Remotely Shutdown/Restart PC's at night
I like the computer to be on overnight, because Sophos does a scan at 2am. I use "shadow volume" now, so that all files are "backed up", and if the occasional document is still open, it'll get backed up the next evening anyway!
Re: Remotely Shutdown/Restart PC's at night
Yeh we are having a play with PSShutdown right now. Seems good.
Re: Remotely Shutdown/Restart PC's at night
This is in our startup script here, serves a dual purpose. One to schedule the shutdown of the pc's (and so if they come back on, it switches them off again) and it clears the scheduled task list (just in case someone gets one in there ;))
fooby
Code:
schtasks /create /sc daily /st 18:00:00 /tn "Shutdown at 1800" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
schtasks /create /sc daily /st 22:00:00 /tn "Shutdown at 2200" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
schtasks /create /sc daily /st 00:00:00 /tn "Shutdown at 0000" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
schtasks /create /sc daily /st 01:00:00 /tn "Shutdown at 0100" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
schtasks /create /sc daily /st 03:00:00 /tn "Shutdown at 0300" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
schtasks /create /sc daily /st 05:00:00 /tn "Shutdown at 0500" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system
Re: Remotely Shutdown/Restart PC's at night
If you want to be able to reboot a selected group of workstations (to pick up an update) you can get hold of my RPKiller script from this here forum... just do a search.
Re: Remotely Shutdown/Restart PC's at night
I use poweroff: http://users.pandora.be/jbosman/poweroff/poweroff.htm and wakeonlan as has been said.
Code:
poweroff shutdown -remote <computername> -use_nt -warn -warntime 60 -msg "Your pc will power off in 60 seconds\nPlease save your work" -force -quiet
Re: Remotely Shutdown/Restart PC's at night
This is what I do - about 30 minutes before the backups start
"E:\program files\PSShutdown\PSShutdown.exe" @PCList.txt -o -f > "E:\program files\psshutdown\logout.log"
"C:\Program Files\LimitLogin\llogincmd.exe" /c
PCList.txt is just a text file with a list of PC names in, and it dumps output into a file just in case I want to have a look.
Re: Remotely Shutdown/Restart PC's at night
I just use "shutdown -i" to invoke interactive mode and select a group of machines by name to shutdown. Doesn't take too much time to do!
I've got a problem with WOL, our switches discard the MAC table after a couple of hours so in the mornings there's no MAC address info on the switches so WOL doesn't work :(
Really need to look into that!
Re: Remotely Shutdown/Restart PC's at night
I use Shutdown -i like Indie, however this only works on XP Professional machines and not 2000 Professional.
Right click the desktop and select New > Shortcut
The fields should read as follows:
Target: %windir%\System32\shutdown.exe -i
Start in: %windir%\System32\
Now apply changes. Double click the shortcut and you can specify any number of XP machines on your domain to restart or shutdown. I use this everynight to shutdown XP machines :)
Re: Remotely Shutdown/Restart PC's at night
look at Beyondexec....I use that. Does much more besides..:) You'll need to google it though.
Re: Remotely Shutdown/Restart PC's at night
Looks useful.. will check it out.
Re: Remotely Shutdown/Restart PC's at night
From experts exchange :
The icon simply executes a trivial batch file that has one line per PC to send a magic packet.
Looks like this:
mc-wol aa:bb:cc:dd:ee:ff
mc-wol aa:bb:cc:dd:ee:ff
mc-wol aa:bb:cc:dd:ee:ff
where the aa:bb:cc:dd:ee:ff on each line is the NIC address for the different computers I want turned on.
mc-wol is a simple utility that just sends a magic packet -- available free here: http://www.matcode.com/wol.htm
They also have a free utility (mcgetmac) to show you the NIC address for each of your PC's.
There is wake on lan and also remote shutdown :) Both free utils and you can get a batch file to use them as far as I am aware by using the mac addresses of the NICS.
Re: Remotely Shutdown/Restart PC's at night
Quote:
Originally Posted by gecko
From experts exchange
The icon simply executes a trivial batch file that has one line per PC to send a magic packet.
Looks like this
mc-wol aabbccddeeff
mc-wol aabbccddeeff
mc-wol aabbccddeeff
where the aabbccddeeff on each line is the NIC address for the different computers I want turned on.
mc-wol is a simple utility that just sends a magic packet -- available free here http//www.matcode.com/wol.htm
They also have a free utility (mcgetmac) to show you the NIC address for each of your PC's.
There is wake on lan and also remote shutdown ) Both free utils and you can get a batch file to use them as far as I am aware by using the mac addresses of the NICS.
Top tip Gecko
Just tested on one PC - but it looks very promising. Hmmmm, this would replace the £600 of WOL software that F-S where going to charge.
Many thanks.