Solved

Tool for pulling a list of all users currently logged into a domain

Posted on 2009-07-08
2
398 Views
Last Modified: 2012-05-07
I need a little tool which will do an IP scan of a subnet and then tell me who is logged in on each PC. I have see the PSLOGGEDIN tool but want something that will quickly scan the network and tell me. Any ideas?

Thanks
0
Comment
Question by:mlscott
2 Comments
 
LVL 10

Accepted Solution

by:
dnilson earned 500 total points
ID: 24810255
How about User Finder
http://download.cnet.com/User-Finder/3000-2651_4-80315.html

==================
VB Code:
Private Sub Command1_Click()Set objDomain = GetObject("WinNT://domain_name,domain")objDomain.Filter = Array("User") For Each objuser In objDomain    Wscript.Echo objuser.NameNext End Sub

====================
logon script that records who logs into each computer.

echo logon %username% %computername% %date% %time% >> \\FILE_LOCATION.txt
====================
strComputer = RemoteComputer
Set objWMIService = GetObject(winmgmts: _
    & {impersonationLevel=impersonate}!\ & strComputer & rootcimv23)
Set colComputer = objWMIService.ExecQuery _
    (Select * from Win32_ComputerSystem)
For Each objComputer in colComputer
    Wscript.Echo <a href="http://objComputer.Us" title="http://objComputer. " target="_blank">objComputer.Us</a>erName
Next

======================

http://www.windowsitpro.com/windowsscripting, enter 48796 in the InstantDoc ID text box, then click the 48796.zip hotlink. I wrote this script for machines running Windows XP. To launch the script, use the command

CScript FindLogon.vbs domain\nt_id
where domain is the name of the user's domain and nt_id is the user's logon name.

FindLogon.vbs assumes that the home directory field in the user's domain account properties isn't empty. This field contains the name of the user's home server, which is needed to access that server's sessions. When a user accesses resources on a server, an active session is established-between the user's computer and that server. Sessions are managed by the file service. Thus, to obtain session objects, FindLogon.vbs binds to the LanmanServer service, as Listing 1 shows. The script then iterates through each session object to obtain the name of the computer involved in that session.
=========================
not Sure if you have SMS 2003 in your Environment. It has GUI interface where you need to just enter the Machine or User Name it will provide your where the user is Logged on along with other useful information
0
 
LVL 3

Expert Comment

by:Lisij
ID: 24824056
how about "net session" command ran from the DC?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question