Sometimes can be useful to send RDP session to physical Console because of automation which operates with GUI buttons, for example Autoit. If session will be disconnected then GUI operations can’t be performed because of lockscreen in disconnected session.
Here is command which send RDP session to Console:
C:\Windows\System32\tscon.exe 0 /dest:console
To determine ID of session (in this case 0), type in CMD quser. Sometimes is ID of session variable so you can make Batch file Logoff.bat:
START C:\Windows\System32\tscon.exe 0 /dest:console START C:\Windows\System32\tscon.exe 1 /dest:console START C:\Windows\System32\tscon.exe 2 /dest:console START C:\Windows\System32\tscon.exe 2 /dest:console START C:\Windows\System32\tscon.exe 3 /dest:console START C:\Windows\System32\tscon.exe 4 /dest:console START C:\Windows\System32\tscon.exe 5 /dest:console START C:\Windows\System32\tscon.exe 6 /dest:console START C:\Windows\System32\tscon.exe 7 /dest:console START C:\Windows\System32\tscon.exe 8 /dest:console START C:\Windows\System32\tscon.exe 9 /dest:console START C:\Windows\System32\tscon.exe 10 /dest:console
More about TScon.exe here.