I have this that gives me the domain\username of the remote logged on
user:
strComputer = InputBox("Enter the PC-name you want to know who's
logged on at", "Who is logged on?")
if strComputer = "" then
WScript.Echo "Don't you want to know?"
end if
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From
Win32_ComputerSystem")
For Each objItem in colItems
Name = objItem.UserName
wscript.echo name
Next
But i want to output the fullname of the user. I have tried everything
i can think of but only get my own fullname.
I have this that gives me the fullname of the localy logged on user,
but can not get it to work with the other script.
Set WshNetwork = WScript.CreateObject("WScript.Network")
objUserName = WshNetwork.UserName
Set objUser = GetObject("WinNT://" & Name)
wscript.echo objUser.FullName
Any help to get me in the right direction would be much appreciated.