Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shut down script 3

Status
Not open for further replies.

khozi

IS-IT--Management
Jun 17, 2001
13
NZ
I need a script to automatically shut down my server at a specified time. Any suggestions?
 
you can use the shutdown.exe utility from NT4 resource kit... it works great even on Win2K Peter Van Eeckhoutte
peter.ve@pandora.be

 
My apologies for the blatent plagurisation of this script - will be real Script Author please stand up, please stand up, please stand up...

REM **************************************
REM * Citrix reboot file
REM * Reboot every Wednesday 12:00 P.M
REM ***************************************

REM * Disable logon so new users can't logon
change logon /disable
REM * Broadcast Server Shutdown
msg * Server will reboot in 5 minutes, please save all work and log off now!
REM * Pause first 3 minutes
C:\WINNT\sleep.exe 180
REM * Broadcast Server Shutdown again
msg * Server will reboot in 2 minutes, please log off.
REM * Pause for 60 seconds
C:\WINNT\sleep.exe 60
REM * Reset all ICA/TCP sessions
echo y | reset session ica-tcp
REM * Stop print spooler for 30 seconds
net stop spooler
C:\WINNT\sleep.exe 30
REM * Delete all stalled print jobs and delay for 20 seconds
Del /S /F /Q C:\Winnt\system32\spool\printers\*.*
C:\WINNT\sleep.exe 20
REM * Shutdown Server
C:\WINNT\Shutdown.exe /L /R /Y

REM Note: Remember the /Y after the shutdown command. Shutdown.exe and sleep.exe copied to the C:\WINNT directory from the win2k resource kit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top