Hi,
Logging off one user is easy, find the users session id and run the command
"logoff session_id"
if you want to log off everyone on a server (as opposed to resetting their
session which is easy, simply reset the ICA listener) then you ue the commands:
:: log off disconnected sessions
for /f "tokens=2" %i in ('quser ^| find "Disc"') do logoff %i
for a remote server (represented as %server%) this would be:
for /f "tokens=2" %i in ('quser /server:%server%^| find "Disc"') do logoff %i
/server:%server%
It's not hard to extend this to do a whole farm.
For logged on (Active) sessions (but don't log yourself off):
for /f "tokens=3" %i in ('quser ^| find "Active" ^| find /v ">"') do logoff %i
for a remote server (represented as %server%) this would be:
for /f "tokens=3" %i in ('quser /server:%server%^| find "Active"') do logoff
%i /server:%server%
regards,
Rick
Ulrich Mack
Volante Systems
________________________________
From: thin-bounce@xxxxxxxxxxxxx on behalf of Taylor, George
Sent: Fri 31/03/2006 8:17
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Disconnected sessions
OK, I have to admit I haven't touched Citrix for some time now. Using XPe SP3
FR3 how do I automatically logooff disconnected sessions, perferably only on
one server.
Thanks,
George
#####################################################################################
This e-mail, including all attachments, may be confidential or privileged.
Confidentiality or privilege is not waived or lost because this e-mail has been
sent to you in error. If you are not the intended recipient any use,
disclosure or copying of this e-mail is prohibited. If you have received it in
error please notify the sender immediately by reply e-mail and destroy all
copies of this e-mail and any attachments. All liability for direct and
indirect loss arising from this e-mail and any attachments is hereby disclaimed
to the extent permitted by law.
#####################################################################################