Hi!
with this script, i know the user corrently logged in my computer:
strComputer = inputbox("Dime el PC y te dire el usuario:")
If strComputer = "" then WScript.Quit
set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strComputer & "")
set colOS = objWMI.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem In colOS
if strUsers <> "" then
strUsers = strUsers & ", " & objItem.UserName
else
strUsers = objItem.UserName
End If
Next
wscript.echo "The following user(s) are logged on to " & strComputer & ":" & strUsers
...but i would like to know the user connect in a PC on my domain. My domain is named SERVER_1.
Help me please!!!!
with this script, i know the user corrently logged in my computer:
strComputer = inputbox("Dime el PC y te dire el usuario:")
If strComputer = "" then WScript.Quit
set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strComputer & "")
set colOS = objWMI.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem In colOS
if strUsers <> "" then
strUsers = strUsers & ", " & objItem.UserName
else
strUsers = objItem.UserName
End If
Next
wscript.echo "The following user(s) are logged on to " & strComputer & ":" & strUsers
...but i would like to know the user connect in a PC on my domain. My domain is named SERVER_1.
Help me please!!!!