SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

tssessions

Terminal Server Session Management

To check the sessions on a Windows Server 2008 Terminal Server do this:

  • Start Server Manager (either right click Computer and select Manage, or start Server Manager from Start → All Programs → Administrative Tools → Server Manager)
  • Expand the Roles, and go to the Terminal Services role.
  • Select the Terminal Services Manager

There are three tabs: users, sessions and processes:
tssessions01.jpg

Through the Command Line

Of course you can also check for logged on users/sessions using commands:

C:\Documents and Settings\sjoerd>psexec \\server01 query session

PsExec v1.55 - Execute processes remotely
Copyright (C) 2001-2004 Mark Russinovich
Sysinternals - www.sysinternals.com


 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
>                                            0  Disc    rdpwd
 ica-tcp                                 65536  Listen  wdica
 rdp-tcp                                 65537  Listen  rdpwd
 console                                     5  Conn    wdcon
 ica-tcp#104       user123                   2  Active  wdica
 ica-tcp#106                                 1  Conn    wdica
query exited on server01 with error code 1.

C:\Documents and Settings\sjoerd>psexec \\server01 query user

PsExec v1.55 - Execute processes remotely
Copyright (C) 2001-2004 Mark Russinovich
Sysinternals - www.sysinternals.com


 USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
 user123               ica-tcp#104         2  Active          .  6/26/2012 8:27 AM
query exited on server01 with error code 1.

Enable/Disable logons

You can enable / disable logons on terminal servers like this:

change logon /enable
change logon /disable

Query the current setting:

change logon /query

If you have sysinternals installed you can do it from remote as well:

C:\Documents and Settings\sjoerd>psexec \\<servername> change logon disable
PsExec v1.55 - Execute processes remotely
Copyright (C) 2001-2004 Mark Russinovich
Sysinternals - www.sysinternals.com


Session logins are currently DISABLED
change exited on <servername> with error code 1.
You could leave a comment if you were logged in.
tssessions.txt · Last modified: 2021/09/24 00:25 (external edit)