How known which ip address is a rdp session connected to?

Acewind 41 Reputation points
2020-09-02T11:18:26.54+00:00

My win 2016 server has multi network interfaces and addresses. When I logon on by rdp and try to get current rdp session information by WTSQuerySessionInformation API in C# code, I want to know which server ip address does current rdp session use. But WTSQuerySessionInformation does not return this. Is there any other solution?

Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
262 questions
0 comments No comments
{count} votes

Accepted answer
  1. suvasara-MSFT 10,041 Reputation points
    2020-09-03T18:56:35.03+00:00

    Greetings,

    We pick the private address from the primary network interface while using Azure Bastion.


    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most 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.