You can use the Task Scheduler and the shutdown.exe command from the
Resource Kit
to accomplish this.
This works pretty well, but beware if the machine is running SQL
server or Exchange Server. You might want to write a command script
that shuts down the SQL/Exchange services first before it invokes the
shutdown command and schedule the script instead.
"Sometimes I do not know but I try hard"- R.F. Haughty 1923
You can also use on a workstation or regular server:
TsshutdnEnables an administrator to remotely shut down or reboot a terminal server. You can also choose to power off the server if the computer supports software control of AC power.
Parameters
WaitTime
After notifying users, specifies an amount of time (in seconds) to wait before logging off all users from their sessions. The default is 60 seconds.
/server:ServerName
Specifies the terminal server to shut down. If unspecified, the current terminal server is shut down.
/reboot
Reboots the terminal server after user sessions are ended.
/powerdown
Turns off the terminal server if the computer supports software control of AC power.
/delay:LogOffDelay
After logging off users from their sessions, specifies the amount of time to wait before ending all processes and shutting down the terminal server. The default is 30 seconds.
/v
Displays information about the actions being performed.
/?
Displays help at the command prompt.
Remarks
You must have administrative privileges run tsshutdn.
Using Shut Down on the Start menu is not recommended for shutting down a terminal server. This method does not notify users before ending their sessions.
All connected sessions are notified that they are going to be shut down. Sessions that have applications with open files prompt the user to save the files. After initiating the logoff command, tsshutdn waits a specified interval (the default is 30 seconds, which is set by /delay), before ending all processes.
Tsshutdn does not reboot the terminal server unless the /reboot option is specified.
Be certain that if you schedule using the AT feature or through Task Scheduler that you modify the normal credentials to that of a server Administrator and password, as the normal System account that otherwise would be used by default will not succeeed.
This is true for either Shutdown.exe or Tsshutdn.exe.
Saddatabid,
I hope it's not a Blue Screen that makes your server reboot! First check your 'Startup and Recovery' Settings, if these are set to reboot your server upon errors, check your Event Viewer for errors.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.