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?
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?
If the user is resetting themselves, %username is the variable you want.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome - thank you!