{"id":988,"date":"2014-08-09T12:34:07","date_gmt":"2014-08-09T16:34:07","guid":{"rendered":"https:\/\/digitalmediaphile.com\/?p=988"},"modified":"2014-08-09T12:34:07","modified_gmt":"2014-08-09T16:34:07","slug":"end-rdp-session-and-return-session-to-physical-console-in-8-1-with-batch-file","status":"publish","type":"post","link":"https:\/\/digitalmediaphile.com\/index.php\/2014\/08\/09\/end-rdp-session-and-return-session-to-physical-console-in-8-1-with-batch-file\/","title":{"rendered":"End RDP Session and Return Session to Physical Console in 8.1 with Batch File"},"content":{"rendered":"<p>&#160;<\/p>\n<p>One of the things that has bugged me in Windows 8.1 is that the shortcut I had on my main desktop to End RDP and return control to the console:<\/p>\n<p>&#160;<\/p>\n<blockquote>\n<p>C:\\Windows\\System32\\tscon.exe RDP-Tcp#1 \/dest:console<\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>stopped working because Window 8.1 increments the session every time you initiate a session. I\u2019ve used this for years, going back multiple operating systems.<\/p>\n<p>This was driving me crazy. Why? Because I\u2019m lazy and if the session isn\u2019t returned to the console, in Windows 8.1, I have to deal with the lock screen and logging on locally. (This is at home, not in an office, where obviously I\u2019d want the computer locked when not sitting at it).<\/p>\n<p>I looked at Power Shell, and didn\u2019t want to deal with the complexity of determining the session ID and generating the right commands. What I came up with was an old fashioned batch file. You can construct this and increment to your heart\u2019s content. It looks like this:<\/p>\n<blockquote>\n<p>C:\\Windows\\System32\\tscon.exe RDP-Tcp#1 \/dest:console     <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#2 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#3 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#4 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#5 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#6 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#7 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#8 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#9 \/dest:console      <br \/>C:\\Windows\\System32\\tscon.exe RDP-Tcp#10 \/dest:console<\/p>\n<\/blockquote>\n<p>You can keep incrementing to suit your needs. Mine goes up to 60 or so. <\/p>\n<p>Next, place the batch file somewhere on your hard drive (<strong>NOT<\/strong> on the desktop itself).<\/p>\n<p>Right click the batch file and select <strong>Send To, Desktop (create shortcut)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"endrdp\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"endrdp\" src=\"https:\/\/digitalmediaphile.com\/wp-content\/uploads\/2014\/08\/endrdp.png\" width=\"550\" height=\"433\" \/>&#160;<\/p>\n<p>On your desktop, find the new shortcut and right click and select <strong>Properties<\/strong><\/p>\n<p>Select <strong>Advanced<\/strong><\/p>\n<p>Check <strong>Run as administrator<\/strong> and then<strong> OK<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"rdp2\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"rdp2\" src=\"https:\/\/digitalmediaphile.com\/wp-content\/uploads\/2014\/08\/rdp2.png\" width=\"550\" height=\"558\" \/><\/p>\n<p>Next (optionally) change the icon to something you will recognize easily by selecting <strong>Change Icon<\/strong>.<\/p>\n<p>I selected the icon that was attached to my old, no longer working shortcut<\/p>\n<p>&#160;<img loading=\"lazy\" decoding=\"async\" title=\"rdp3\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"rdp3\" src=\"https:\/\/digitalmediaphile.com\/wp-content\/uploads\/2014\/08\/rdp3.png\" width=\"452\" height=\"607\" \/> <\/p>\n<p>Click <strong>OK<\/strong> and you\u2019re done. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"rdp4\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"rdp4\" src=\"https:\/\/digitalmediaphile.com\/wp-content\/uploads\/2014\/08\/rdp4.png\" width=\"206\" height=\"170\" \/> <\/p>\n<p>Now when you RDP in to your desktop, you can double click\/tap the icon for the shortcut on your desktop which will run the batch file as administrator and disconnect the session and return control to the console. <\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160; One of the things that has bugged me in Windows 8.1 is that the shortcut I had on my main desktop to End RDP and return control to the console: &#160; C:\\Windows\\System32\\tscon.exe RDP-Tcp#1 \/dest:console &#160; stopped working because Window 8.1 increments the session every time you initiate a session. I\u2019ve used this for years, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[169],"tags":[5,313],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"jetpack_publicize_connections":[],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>&#160; One of the things that has bugged me in Windows 8.1 is that the shortcut I had on my main desktop to End RDP and return control to the console: &#160; C:\\Windows\\System32\\tscon.exe RDP-Tcp#1 \/dest:console &#160; stopped working because Window 8.1 increments the session every time you initiate a session. I\u2019ve used this for years, going back multiple operating systems. This was driving me crazy. Why? Because I\u2019m lazy and if the session isn\u2019t returned to the console, in Windows 8.1, I have to deal with the lock screen and logging on locally. (This is at home, not in an&hellip;<\/p>\n","category_list":"<a href=\"https:\/\/digitalmediaphile.com\/index.php\/category\/windows-8-1\/\" rel=\"category tag\">Windows 8.1<\/a>","author_info":{"name":"barbbowman","url":"https:\/\/digitalmediaphile.com\/index.php\/author\/barbbowman\/"},"comments_num":"0 comments","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pvFKI-fW","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/posts\/988"}],"collection":[{"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/comments?post=988"}],"version-history":[{"count":0,"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/posts\/988\/revisions"}],"wp:attachment":[{"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/media?parent=988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/categories?post=988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalmediaphile.com\/index.php\/wp-json\/wp\/v2\/tags?post=988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}