question

ITSecurity-5983 avatar image
0 Votes"
ITSecurity-5983 asked srbose-msft answered

How to prevent RDC to Windows 10 VM when one user is already connected?

We have one Windows 10 VM, and two people need to access it. How to know if someone is already logged in? Right now, if one user tries to connect, the other user is disconnected and that creates problems with whatever software was used at the time.

azure-virtual-machinesremote-desktop-client
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

srbose-msft avatar image
0 Votes"
srbose-msft answered

@ITSecurity-5983 , Thank you for your question.

You can Run PowerShell Scripts in your Windows VM by using Run Command to execute the command query session to look for Active RDP connections. Following is a sample output:

  SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
  services                                    0  Disc
  console                                     1  Conn
 >rdp-tcp#1         ***                       2  Active
  rdp-tcp                                 65536  Listen

[Username has been redacted]

Sharing this community article on how to change the default behavior and allow multiple remote desktop session sessions. Please do check if this helps you further.

References:

Hope this helps.

Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.