[THIN] Re: session kill

  • From: marcus <marcus@xxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 05 Jun 2014 15:36:42 +0200

Raffensberger, Stephen D wrote:
No, it only logs off the session ID’s that belong to %USERNAME% on each
server. Then it moves on to the next server and does it again.

Users don’t have permission to log each other off anyway. They can only
log themselves off.

Hej,

first: many thanks, i've seen the script, tested and deployed it. As icon the red Powerbutton from Shell32.dll, a descriptive name - no room left for questions like "What's that for".

One Question / an observation i made: what about disconnected sessions?
As far as i've seen they aren't logged off.

cheers, Marcus


Logo Produban

*/Steve Raffensberger/*//

Citrix Administrator

Produban US

*From:*thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] *On
Behalf Of *Jason CitrixADmin
*Sent:* Wednesday, June 04, 2014 3:39 PM
*To:* thin
*Subject:* [THIN] Re: session kill

One last question... WE have almost 3000 users. I have tested in lab
environment, and it works, but in the production environment, will this
log off anyone who has the same session ID?

Especially since this is going across multiple servers.

Thank you

jason

On Tue, Jun 3, 2014 at 4:41 PM, Raffensberger, Stephen D
<sraffens@xxxxxxxxxxx <mailto:sraffens@xxxxxxxxxxx>> wrote:

Yes, sorry about that. I was going from memory and I’ve killed too many
brain cells for that.

It’s query user that lets you specify the username…not logoff.

So, it’s not a one-liner. It’s the script below. The inside for loop
parses the output from query user and gives the session ID to logoff.

for /f %%i in (CitrixFarmList.txt) do (

query user %USERNAME% /server:%%i 2>NUL | find /i "%USERNAME%" >
%TEMP%\%%i.txt

FOR /F "tokens=3" %%j in (%TEMP%\%%i.txt) do @logoff %%j /server:%%i

)

Logo Produban

*/Steve Raffensberger/*

Citrix Administrator

Produban US

*From:*thin-bounce@xxxxxxxxxxxxx <mailto:thin-bounce@xxxxxxxxxxxxx>
[mailto:thin-bounce@xxxxxxxxxxxxx <mailto:thin-bounce@xxxxxxxxxxxxx>]
*On Behalf Of *Jason CitrixADmin
*Sent:* Tuesday, June 03, 2014 4:06 PM
*To:* thin
*Subject:* [THIN] Re: session kill

Doesn't this command require the session name, not the username?

On Tue, Jun 3, 2014 at 2:01 PM, Raffensberger, Stephen D
<sraffens@xxxxxxxxxxx <mailto:sraffens@xxxxxxxxxxx>> wrote:

I just publish a self-help script that scans the whole farm and
terminates all sessions it finds.

The script is a one liner. You can call it something like “Kill Me Now”.

FOR /F %%i in (CitrixFarmList.txt) do logoff %USERNAME% /SERVER:%%i

When users become hung, they just execute this script.

Logo Produban

*/Steve Raffensberger/*

Citrix Administrator

Produban US

*From:*thin-bounce@xxxxxxxxxxxxx <mailto:thin-bounce@xxxxxxxxxxxxx>
[mailto:thin-bounce@xxxxxxxxxxxxx <mailto:thin-bounce@xxxxxxxxxxxxx>]
*On Behalf Of *Jason CitrixADmin
*Sent:* Tuesday, June 03, 2014 1:24 PM
*To:* thin
*Subject:* [THIN] session kill

I would like for users to be able to kill their own sessions.
Occasionally our app will hang up, and when that happens the only way we
have been able to clear it is to reset the users session. i am looking
for a way to allow the users teh ability to do this themselves without
having to involve support.

My current brain storm is have a "secondary" app launch with our main
one. It will simply be a button they can click that will force a log off
using the shutdown /l /f command.

While I can implement that easily enough the trouble I am finding is
that I need a way to make sure that this secondary app closes on its own
if they exit the main app.

If built with a VBscript is there a way to get the secondary one to
watch for the termination of the main app and close itself or exit if
the main one closes?

I have very little scripting experience and am trying to come up with a
solution on my own time at the moment that I can present since I know my
suggestion will fall on mostly deaf ears if I ask for something to be
developed.

We recently changed our email addresses to reflect the Bank’s new name,
Santander. Please update your records accordingly.

This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received the
message in error, please advise the sender by reply e-mail, and delete
or destroy the message. Thank you.

------------------------------------------------------------------------

*P*Please consider the environment before printing this email

We recently changed our email addresses to reflect the Bank’s new name,
Santander. Please update your records accordingly.

This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received the
message in error, please advise the sender by reply e-mail, and delete
or destroy the message. Thank you.

------------------------------------------------------------------------

*P*Please consider the environment before printing this email

We recently changed our email addresses to reflect the Bank’s new name,
Santander. Please update your records accordingly.

This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received the
message in error, please advise the sender by reply e-mail, and delete
or destroy the message. Thank you.

------------------------------------------------------------------------

*P***Please consider the environment before printing this email

************************************************
For Archives, RSS, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link:
//www.freelists.org/list/thin
************************************************

Other related posts: