Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find User name across domain with only pcname 1

Status
Not open for further replies.

chrisbo

Technical User
Aug 9, 2002
4
FR
How do I find who is logged onto a PC across the domain with only the PC name
Microsoft Domain
 
You can download a samll util called "tell me where" from email me if you can find it al send it.. it is only 228k, does not even need an installation.. Regards

Yardyy
 
Go to WINS Manager and sort by machine. This will list the PC name and next to it (above or below) the Username.
 
tell me where isn't that great of a tool, I think it may also be as picky as being case sensitive. The best thing to use for this, and a billion other NT LAN "Things" is dameware .
If you get dameware utilities, navigate to the workstations or servers and do a properties on the machine you will get who is logged in under the network tab. You can also get other information that is oh-so-very-neat-and-sweet!
 
Here is a vb script that does the trick....
Just copy this into a text file and rename the extension to .vbs (oh, and make sure some of the lines don't wrap)

ComputerName = "COMPUTERNAME"
winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//"& COMPUTERNAME &""

Set UserSet = GetObject( winmgmt1 ).InstancesOf ("Win32_ComputerSystem")
strCurrentUser = ""
cntrs = 0
for each User in UserSet
If cntrs > 1 Then
strCurrentUser = strCurrentUser & ", " & User.UserName
Else
strCurrentUser = User.UserName
End If
cntrs = cntrs + 1
Next

Msgbox "Current Logon (" & COMPUTERNAME & " is " & strCurrentUser, vbOkOnly, "Current Logon"
 
Use: NBTSTAT -a pcname

If the far-end computer is on, it will respond. If someone's logged in, it will show the username also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top