Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List the User Logged on to a Remote ComputerContent of List the User Logged on to a Remote Computer.vbsMD5 Hash: FF89176BB0E0E5859544686B615B062C |
||
' Description: Returns the user name of the user currently logged on to a remote computer. To use this script, replace atl-ws-01 with the name of the remote computer you want to check. Although this script will run on Windows NT 4.0, Windows 98, and Windows 2000, it will not always return information.
strComputer = "atl-ws-o1" 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 Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |