• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 906
  • Last Modified:

Log off session script

I need to create a script which log off all the users sessions in citrix server at night.can anybody help me in such script?
0
alaayehya1
Asked:
alaayehya1
  • 3
  • 3
1 Solution
 
alaayehya1Author Commented:
I need to logoff both the active sessions and the disconnected sessions.disconnecting the sessions will not help me solve my problems and maintains the profiles on the server.
0
 
bigbunk390Commented:
Take a look at this one.
http://www.dabcc.com/article.aspx?id=2859

You could create a batch file and place it on the server that calls the command from the site above.
You then create a scheduled task to run the batch at the time you desire.
0
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

 
bigbunk390Commented:
Here is the link to the site that has the latest version of the file described in the link I provoded above:

http://www.ctrl-alt-del.com.au/CAD_Utils.htm

Scroll down near the bottom of the page to find it. It says it allows you to logoff all sessions and/or disconnected sessions.
0
 
alaayehya1Author Commented:
thank you bigbunk390

but here i have 1 more question can i write this in a script  as batch file then create task and execute it from the server or no I need to download the freeware and setup it on the server.

would you please tell me how we write this in a script?

thanks
0
 
bigbunk390Commented:
Yes, you can create a batch file and have task scheduler run it.
You will need to download the file and have it on the server if the task is going to be ran on the server.
The batch would look like this (if the batch file and the tslogoff file should be in the same directory for ease but can be placed anywhere; just make sure the path is correct):

@echo off
TSLogoff ALL
exit


If you wanted to run the batch from say your workstation and log off sessions on 2 servers; you would download the file to your computer and the batch would look like this (the batch will need to run as a user that has rights on the server to log users off; like an admin):

@echo off
TSLogoff ALL /SERVER:Server1
TSLogoff ALL /SERVER:Server2
exit
0
 
alaayehya1Author Commented:
it's partially solved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now