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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to log out all users

Status
Not open for further replies.

BudT

IS-IT--Management
Nov 14, 2000
87
US
Is there a way to log out all users logged into a Metaframe 1.8 system. I need to do this as part of a maintenace process on a rotating basis.
 
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.


===LOGOFF=========================
LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

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.


===SHUTDOWN=======================
SHUTDOWN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
[/DELAY:logoffdelay] [/V]

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.

Dave Namou, MCSE CCEA
 
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....

Remember to re-enable the protocols...!!!


 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top