I'm not exactly sure what your trying to do once the users logoff, but here are some commands that should work...
- You can use the CHANGE LOGON command to disable any new logons, then...
- You could use the logoff command to logoff users, but the only problem is you have to specify the Session ID for each user. You could write a huge script that logs off each Session ID at a time. Or someone might know a better trick.
- You could also use the Shutdown command to log everyone out. The trick with this is (using the example below) the 5 is how many seconds to wait after the command runs to log everyone out. The 600 is how long to wait before actually rebooting the server. I'm not sure if rebooting the server is part of your maintenance, but I recommend it. This one should work perfect for you unless you don't want to reboot the server.
Shutdown 5 /reboot /delay:600
- Here is another thread that will help you with some more ideas about scheduled reboots.
thread48-212447
==I just used the /? switch and cut and pasted the help for each commands below==
===DISABLE LOGONS=================
-change logon /disable - Disables all users from logging on remotely by ICA sessions.
-change logon /enable - Enables all users from logging on remotely by ICA sessions.
-change logon /query - Queries the current state of logon.
sessionname The name of the session.
sessionid The ID of the session.
/SERVER:server Specifies the Terminal Server containing the user
session to log off (default is current).
/V Displays information about the actions performed.
wait_time Seconds to wait after user notification before
terminating all user sessions (default is 60).
/SERVER:servername The server to shut down (default is current).
/REBOOT Reboot the server after user sessions are terminated.
/POWERDOWN The server will prepare for powering off.
/DELAY:logoffdelay Seconds to wait after logging off all connected
sessions (default is 30).
/V Display information about actions being performed.
Depending on what you want to do after everyone is logged off.....
U could use the Citrix Connection Configuration manager to disable available protocols (ICA/RDP), this will logout any active connections and stop anyone trying to connect...although you still have full control of the server from the console....
For what it's worth, the SHUTDOWN command is not available on my Windows 2000 server. At least as far as I can see. It says it is not a recognizable command.
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.