How to tell who is logged onto a windows xp machine

I'm running Windows 2003 Servers and Windows XP machines. Is there a way to see who is logged onto what machine?
Who is Participating?
ScrptMastaConnect With a Mentor Commented:
If you know the IP of the computer you can use this script to tell you who is logged on.

strComputer = ""
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colComputer = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
    Wscript.Echo "Logged-on user: " & objComputer.UserName
Nirmal SharmaSolution ArchitectCommented:
vbplayerAuthor Commented:
I should have said why I want to know. When I need to log onto a machine remotely I might not always know the machine name. I'm thinking if there is a way to see who is logged onto what machine I could get the machine name from there.
You can try the below
(1) Software like NEWT Professional. They allow you to run on a domain or a range of IP address & give u hostname, IP address, etc etc, user name etc.

(2) U can generate a quesry if u have SMS.

Pls let me know if the above suggestion is of any help.
This is just for anyone else looking for the same answer in the future,

I found PSloggedOn from Sysinternals perfect for this.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.