Link to home
Start Free TrialLog in
Avatar of bytes100
bytes100

asked on

rwinsta bat file to clear citrix sessions

Hi all.
Im  looking to create a bat file to reset a users citrix session. Ideally Id like any user to be able to click a link to the bat file and their citrix session will clear.

So far ive come up with the following commands

qwinsta %username% /server:myservername
set /p id=enter ID to clear session :
echo %id%
rwinsta %id% /server:myservername

This works fine, but im wondering if theres a way to automate the whole process without them having to enter the ID?
Avatar of dlb6597
dlb6597

If the user is resetting themselves, %username is the variable you want.
Avatar of bytes100

ASKER

Hi and thanks for the quick response.

Im aware i need to use %username%, however, I need the actual entire code for this.

i think im looking to take ID from qwinsta and pipe it to the rwinsta part.
ASKER CERTIFIED SOLUTION
Avatar of AmazingTech
AmazingTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Awesome - thank you!