Im trying to wright a batch jobb that will restart our servers a night, the only thing that is left it to auto logoff users before the server restart, and maby empty recycle bin.
Does anyone know a dos command for loging of all users on ICA conections?
128 meg,
Here you go. It wouldn't empty out the recycle bin but it will reboot your server.
If you are running MF XP, you can simply right click on the server within CMC and make a reboot schedule.
I ran this batch file when I was running MF 1.8.
Hope that helps.
**************************************
REM * Citrix reboot file
REM * reboot this server
***************************************
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, you may immediately log back in and continue working.
REM * Pause first 3 minutes
C:\WINNT\wait.exe 180 seconds
REM * Broadcast Server Shutdown again
msg * Server will reboot in 2 minutes, please log off.
REM * Pause for 120 seconds
C:\WINNT\wait.exe 120 seconds
REM * Reset all ICA/TCP sessions
echo y | reset session ica-tcp
REM * Stop print spooler for 30 seconds
net stop spooler
C:\WINNT\wait.exe 30 seconds
REM * Delete all stalled print jobs and delay for 20 seconds
Del /S /F /Q C:\Winnt\system32\spool\printers\*.*
C:\WINNT\wait.exe 20 seconds
REM * Shutdown Server
C:\WINNT\system32\tsshutdn.exe 0 /reboot /delay:00
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.