{"id":2310,"date":"2013-07-15T15:26:05","date_gmt":"2013-07-15T07:26:05","guid":{"rendered":"http:\/\/rmohan.com\/?p=2310"},"modified":"2013-07-15T15:26:05","modified_gmt":"2013-07-15T07:26:05","slug":"logoff-remote-desktop-sessions-via-cmd","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2310","title":{"rendered":"Logoff remote desktop sessions via CMD"},"content":{"rendered":"<p>To List the session in remote server we use quser.exe<\/p>\n<p>Display information about users logged on to the system.<\/p>\n<p>QUSER [username sessionname sessionid] [\/SERVER:servername]<\/p>\n<p>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).<\/p>\n<p>Example:<\/p>\n<p>C:>quser \/server:testserver <\/p>\n<p>USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME<br \/>\nA-BalaK ica-tcp#966 10 Active 7 12\/25\/2010 3:04 PM<br \/>\nGBala ica-tcp#969 1 Active 9 12\/25\/2010 3:30 PM<br \/>\nAdmin ica-tcp#984 5 Active 1:06 12\/25\/2010 4:33 PM<br \/>\nFinance ica-tcp#987 2 Active 4 12\/25\/2010 6:20 PM<\/p>\n<p>Logoff the Remote Sessions<\/p>\n<p>To Log off the terminal session of the remote server, Before you log off the remote session, you should know the &#8220;Session ID&#8221; which you get it from &#8220;QUSER&#8221; commands as above stated.<\/p>\n<p>1. Logoff<br \/>\nLogoff command kicks off (logging off) the specified remote session. Log off help shows,<\/p>\n<p>C:>logoff \/?<br \/>\nTerminates a session.<\/p>\n<p>LOGOFF [sessionname sessionid] [\/SERVER:servername] [\/V]<\/p>\n<p>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.<\/p>\n<p>E.g.,<\/p>\n<p>C:>logoff 2 \/server:testserver \/v<br \/>\nLogging off session ID 2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To List the session in remote server we use quser.exe<\/p>\n<p>Display information about users logged on to the system.<\/p>\n<p>QUSER [username sessionname sessionid] [\/SERVER:servername]<\/p>\n<p>username Identifies the username. sessionname Identifies the session named sessionname. sessionid Identifies the session with ID sessionid. \/SERVER:servername The server to be queried (default is current).<\/p>\n<p>Example:<\/p>\n<p>C:>quser \/server:testserver <\/p>\n<p>USERNAME [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2310"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2310"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2310\/revisions"}],"predecessor-version":[{"id":2311,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2310\/revisions\/2311"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}