Question : Any way of showing a list of the users that logged on to a Windows XP SP3

Hi,

I am running Active Directory on Windows 2003. Is there any way of showing a list of the users that logged on to a Windows XP SP3?

Thank you.

Answer : Any way of showing a list of the users that logged on to a Windows XP SP3

Hi llrava,

I dont think to pull out the current login user in network

But i have a script to find the currect user logged in to a system

Find the script below:

Cheers,
Prem
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
strComputer = inputbox("Please enter the name of the computer:")

' Check that user entered a value
if strComputer = "" then
	wscript.quit
end if

ON ERROR RESUME NEXT ' Handle errors connecting to the computer (Not switched on, permissions error etc)
set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strComputer & "")

if err <> 0 then ' Check for error
	wscript.echo "Error connecting to specified computer: " & err.description
	wscript.quit
end if
ON ERROR GOTO 0 ' Turn off resume next error handling

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
Random Solutions  
 
programming4us programming4us