« Sample Script - WOL or Wake On Lan | Back from Japan »

Sample Script - remote shutdown or hibernation of a Windows system

See this post for how to wake up your server remotely.

This is the second part of my decidedly-not-rocket-science script to remotely shutdown / hibernate a Windows home fileserver. It will should work on anything Win2k or newer, including XP.

Requirements:

1. The excellent freeware application BeyondExec v2 from BeyondLogic.
2. Admin perms of course.
3. Something to remotely wakeup...?

BeyondExec is an excellent utility that will allow you to remotely spawn processes and terminate them as well. The Microsoft command shutdown.exe doesn't allow remote suspension, hibernation or locking the console so this utility is just the thing.

Just edit the script and change "SERVERNAME" to the name of your system, and after -d put in (shutdown,.poweroff, reboot, suspend, hibernate, logoff or lockworkstation) It will ask you to hit any key to confirm, then send the command and ping continuously until you close the window. BTW, "Oyasumi" is Japanese for goodnight...

Get the script here.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)