We have an AD account that is used through Citrix to run automated jobs in a Citrix session on a Server 2003 box. For some reason the “user” sometimes does not log off at night which prevents the automated software from running the next day.

I need to know how to create a script that I can run in a scheduled task that will only log off the specified user. Any ideas?

1 Spice up

You can set a an Idle session timeout policy on the terminal services configuration console.

1 Spice up

The only problem with this is that we need to schedule a log off at exactly 9p every day. Sometimes the user could be logged in up until close to that and may not reach the threshold.

You can logoff a session on Windows with the command “logoff ” but you have to know the specific session ID that you want to log off, you can find the session ID with the command “quser”, but I don’t know the syntax to create a batch script to automate it. Maybe someone over the Windows forum can help with the batch script.

Cheers.

1 Spice up

I can only thing of creating a “task” in the windows task scheduler that does this. (however not very useful) if their is multiple citrix servers.

Can i ask if there is a specific reason why it cannot be run as a scheduled task running as the account in question?