Clear user terminal service sessions via command prompt
Ever try to remote desktop or terminal service into a server and get the maximum number of connections has been reached error?
You could use the GUI interface tsadmin.msc or more recently the Remote Desktop Services Manager to disconnect sessions on the server. However, if you don't have the GUI tools, you can just use the command prompt.
To display the sessions on your server:
qwinsta /server:[Your Server IP or name]
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
User1 2 Disc rdpwd
To disconnect a sesssion:
rwinsta [ID] /server:[Your Server IP or Name]
Source:
http://www.mydigitallife.info/how-to-remotely-terminate-and-disconnect-remote-desktop-terminal-services-connections-or-sessions/
You could use the GUI interface tsadmin.msc or more recently the Remote Desktop Services Manager to disconnect sessions on the server. However, if you don't have the GUI tools, you can just use the command prompt.
To display the sessions on your server:
qwinsta /server:[Your Server IP or name]
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
User1 2 Disc rdpwd
To disconnect a sesssion:
rwinsta [ID] /server:[Your Server IP or Name]
Source:
http://www.mydigitallife.info/how-to-remotely-terminate-and-disconnect-remote-desktop-terminal-services-connections-or-sessions/
Comments
Post a Comment