strComputer = "."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colComputers = objWMI.ExecQuery ("Select * from Win32_ComputerSystem")
For Each Computer in colComputers
if isnull(Computer.username) then
Wscript.Echo "No one loged on at" & Computer.name
else
Wscript.Echo "User " & Computer.UserName & " logged on at " &
Computer.name
End if
Next
Substitute strComputer with computer name or IP and you will get info who is
logged on at that PC.
--
Regards
Matjaz Ladava, MCSE, MCSA, MVP
Microsoft MVP - Active Directory
(e-mail address removed), (e-mail address removed)
http://ladava.com
Raja said:
In my network I have 1000 users, at any point of time i need to know who
are all loggedin to the network and to which computer they have logged in..
is there any script or any utility available for the same