{"id":293,"date":"2013-03-11T13:21:54","date_gmt":"2013-03-11T12:21:54","guid":{"rendered":"http:\/\/sam-soul.fr\/Info\/?p=293"},"modified":"2013-03-11T13:21:54","modified_gmt":"2013-03-11T12:21:54","slug":"logoff-quser-qwinsta-rwinsta","status":"publish","type":"post","link":"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/logoff-quser-qwinsta-rwinsta\/","title":{"rendered":"Logoff, Quser, Qwinsta, Rwinsta"},"content":{"rendered":"<h2>Query the Remote Server for Current Terminal Sessions<\/h2>\n<p>To query and list the sessions on the remote session, you could use QUser.exe or QWinsta<\/p>\n<h4>1. QUser<\/h4>\n<p>QUser command comes with all the latest Windows clients and servers. This will list the sessions of the remote server (or local machine).<\/p>\n<p><span style=\"color: #ffffff;\"><strong>NOTE: if you are using Windows XP, you need to add this location into your System path: C:WindowsSystem32DLLCache. To do this, in command prompt, type the following.<\/strong><\/span><\/p>\n<p><span style=\"color: #ffffff;\"><strong>SET PATH = %PATH%;C:WindowsSystem32DLLCache;<\/strong><\/span><\/p>\n<p>QUser help shows,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:Anand&gt;QUser \/?<br \/>\nDisplay information about users logged on to the system. <\/span><\/p>\n<p><span style=\"font-family: Courier New;\">QUERY USER [username | sessionname | sessionid] [\/SERVER:servername] <\/span><\/p>\n<p><span style=\"font-family: Courier New;\"> username Identifies the username.<br \/>\nsessionname Identifies the session named sessionname.<br \/>\nsessionid Identifies the session with ID sessionid.<br \/>\n\/SERVER:servername The server to be queried (default is current).<\/span><\/p><\/blockquote>\n<p>E.g.,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;quser \/server:MyCitrixSVR<br \/>\nUSERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME<br \/>\njohndoe ica-tcp#966 10 Active 7 7\/31\/2008 3:04 PM<br \/>\naveragejoe ica-tcp#969 1 Active 9 7\/31\/2008 3:30 PM<br \/>\nfamilyman ica-tcp#984 5 Active 1:06 7\/31\/2008 4:33 PM<br \/>\nnormaldude ica-tcp#987 2 Active 4 7\/31\/2008 6:20 PM<br \/>\n<\/span><\/p><\/blockquote>\n<h4>2. QWinsta<\/h4>\n<p>QWinsta is little different and better. It has more features and options. It comes with all flavors of Windows. QWinsta command line help displays as,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;qwinsta \/?<br \/>\nDisplay information about Terminal Sessions. <\/span><\/p>\n<p><span style=\"font-family: Courier New;\">QUERY SESSION [sessionname | username | sessionid]<br \/>\n[\/SERVER:servername] [\/MODE] [\/FLOW] [\/CONNECT] [\/COUNTER] <\/span><\/p>\n<p><span style=\"font-family: Courier New;\"> sessionname Identifies the session named sessionname.<br \/>\nusername Identifies the session with user username.<br \/>\nsessionid Identifies the session with ID sessionid.<br \/>\n\/SERVER:servername The server to be queried (default is current).<br \/>\n\/MODE Display current line settings.<br \/>\n\/FLOW Display current flow control settings.<br \/>\n\/CONNECT Display current connect settings.<br \/>\n\/COUNTER Display current Terminal Services counters information.<\/span><\/p><\/blockquote>\n<p>E.g.,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;qwinsta \/server:citrixserver<br \/>\nSESSIONNAME USERNAME ID STATE TYPE DEVICE<br \/>\n0 Disc rdpwd<br \/>\nica-tcp 65536 Listen wdica<br \/>\nrdp-tcp 65537 Listen rdpwd<br \/>\nconsole 16 Conn wdcon<br \/>\nica-tcp#966 johndoe 10 Active wdica<br \/>\nica-tcp#969 apple 1 Active wdica<br \/>\nica-tcp#984 averagejoe 5 Active wdica<br \/>\nica-tcp#987 familyman 2 Active wdica<br \/>\nica-tcp#989 whoisme 3 Active wdica<\/span><\/p><\/blockquote>\n<p>You are welcome to try the other options QWinsta provides.<\/p>\n<h2>Logoff the Remote Sessions<\/h2>\n<p>To Log off the terminal session of the remote server, you can use any one of two command line tools. One of LOGOFF and another one is RWINSTA. Before you log off the remote session, you should know the &laquo;&nbsp;Session ID&nbsp;&raquo; which you get it from &laquo;&nbsp;QUSER&nbsp;&raquo; OR &laquo;&nbsp;QWINSTA&nbsp;&raquo; commands as above stated.<\/p>\n<h4>1. Logoff<\/h4>\n<p>Logoff command kicks off (logging off) the specified remote session. Log off help shows,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;logoff \/?<br \/>\nTerminates a session. <\/span><\/p>\n<p><span style=\"font-family: Courier New;\">LOGOFF [sessionname | sessionid] [\/SERVER:servername] [\/V] <\/span><\/p>\n<p><span style=\"font-family: Courier New;\"> sessionname The name of the session.<br \/>\nsessionid The ID of the session.<br \/>\n\/SERVER:servername Specifies the Terminal server containing the user<br \/>\nsession to log off (default is current).<br \/>\n\/V Displays information about the actions performed.<\/span><\/p><\/blockquote>\n<p>E.g.,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;logoff \/server:infra-apps 1 \/v<br \/>\nLogging off session ID 1<\/span><\/p><\/blockquote>\n<h4>2. RWinsta<\/h4>\n<p>RWinsta has same parameters and does same thing as log off command. It simply means <strong>R<\/strong>eset <strong>WIN<\/strong>dows <strong>STA<\/strong>tion. The help goes as,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;RWinsta \/?<br \/>\nReset the session subsytem hardware and software to known initial values. <\/span><\/p>\n<p><span style=\"font-family: Courier New;\">RESET SESSION {sessionname | sessionid} [\/SERVER:servername] [\/V] <\/span><\/p>\n<p><span style=\"font-family: Courier New;\"> sessionname Identifies the session with name sessionname.<br \/>\nsessionid Identifies the session with ID sessionid.<br \/>\n\/SERVER:servername The server containing the session (default is current).<br \/>\n\/V Display additional information.<\/span><\/p><\/blockquote>\n<p>E.g.,<\/p>\n<blockquote><p><span style=\"font-family: Courier New;\">C:&gt;RWinsta \/Server:MyWinServer 1<\/span><\/p><\/blockquote>\n<p>Note: RWinsta command does not return anything.<\/p>\n<p>Happy Re-setting the remote sessions (Hey, stop cursing your co-workers who didn\u2019t log off their sessions).<\/p>\n<p>Keywords: Reset remote session, Remote Desktop Session<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Query the Remote Server for Current Terminal Sessions To query and list the sessions on the remote session, you could use QUser.exe or QWinsta 1. QUser QUser command comes with all the latest Windows clients and servers. This will list the sessions of the remote server (or local machine). NOTE: if you are using Windows &hellip; <a href=\"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/logoff-quser-qwinsta-rwinsta\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Logoff, Quser, Qwinsta, Rwinsta&nbsp;&raquo;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[45],"tags":[],"_links":{"self":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/293"}],"collection":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":0,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}