Keep GUI activated after rdp disconnected

M&G 5 Reputation points
2024-03-01T10:35:23.11+00:00

Hi,

I am looking for a solution to keep GUI activated on my Azure VM after rdp disconnected because I am currently monitoring the apps on my VM by screen recording. I tried many solutions on google and chatgpt with the limitations, powershell scripts, creating another VM to keep the rdp open but when I close the rdp black screen on my recording even if all my apps are running perfectly so it's not an issue of the VM shutting down.

Anyone have a solution or is it a hard feature of azure VM ?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,044 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jackson Martins 10,606 Reputation points MVP Volunteer Moderator
    2024-03-01T12:37:36.3533333+00:00

    Hi @mg-1662

    I have a similar scenario, I use a Windows VM and in this case I use VNC software, which keeps the connection open as a "console"

    However, there is a solution on stackoverflow that can help you:

    "we may "convert" a terminal session into a console session instead of disconnecting from Remote Desktop normally by running the following command from inside the terminal session:

    for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (tscon.exe %%s /dest:console)

    This will disconnect you from the session, but it will still run with full graphical context. This answers your question. You can reconnect to it and it will become a terminal session again, and you can do this infinitely. And, of course, autohotkey works perfectly."

    Reference: https://stackoverflow.com/questions/15887729/can-the-gui-of-an-rdp-session-remain-active-after-disconnect

    Get in touch if you need more help with this issue.

    --please don't forget to "[Accept the answer]" if the reply is helpful--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.