Link to home
Start Free TrialLog in
Avatar of kvwestbroek
kvwestbroekFlag for Netherlands

asked on

Remotely logoff users from terminal server

Hi,

We have several terminal servers, all servers are windows 2003. I want to log off the users remotely from the terminal servers, so that the profiles are cleaning from the terminal servers. I have tried it with the query session command and then the logoff-command from the domain controller. But then I must hit a key to continue. I have also tried logoff /f, but it doesn't work.

Does anyone know the solution???
Avatar of jaynir
jaynir
Flag of United States of America image

first you have to query the users that are logged on. you can use qwinsta /server:<servername>

this will show you the username and the ID of the session. Once you know the user who's logged in,
you can use logoff command that will log off the user.
type logoff <session ID>/server:<servername>
ASKER CERTIFIED SOLUTION
Avatar of kvwestbroek
kvwestbroek
Flag of Netherlands image

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