How to know the machine name (or IP) accessing a machine via remote desktop?

Posted on 2011-10-28
Last Modified: 2013-11-05
We got a machine running Win7 Pro, which is used by several people.
I can use "winrs -r:Win7_machine_name -u:Same_user_name -p:password tasklist"
to find out if there is anyone accessing that Win7 via remote desktop.
(If there is a remote desktop login,  above winrs command shows RDP-Tcp#0.)

Is there any DOS command which can be used to display the remote machine info
(machine name or IP)?  Basically I would like to find the machine accessing
Win7 via remote desktop.   If a DOS command can accomplish that, I could combine
with  winrs.  

If there is no such DOS command, is there other way to get that info?
Question by:asugri
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    you might want to try psloggedon from sysinternals
    LVL 22

    Accepted Solution

    in DOS:
    netstat -a -n  | findstr :3389
    netstat -a | findstr :3389

    will show any remote connections IP using RDP port 3389


    Author Comment


    Thanks a lot.  Although findstr does not work (path issue?), netstat -a -n  or netstat -a gives what I'm looking for.


    Thank you for the info.  I prefer to use what is available on Windows.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Image capture and Deploy method is consist on two phases. In our first phase we capture the image of windows from the PC in which Windows and others softwares are already installed. In second phase we deploy the created image on new PC in which we…
    I recently purchased an HP EliteBook 2540p notebook/laptop. It has two video ports on it – VGA and DisplayPort. HP offers an optional docking station for the 2540p that also has both a VGA port and a DisplayPort. There are numerous online reports do…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now