Without Logging-Off

Posted at

add a batch file (disconnect_session.cmd for example), with the following content:

@echo off
C:\\Windows\\System32\\tscon.exe rdp-tcp#0 /dest:console


::--- disconnect current session
::tsdiscon

::tsdiscon rdp-tcp#0
::tsdiscon 2 /v


', 'Disconnect A Windows-Based Virtual-Machine