Link to home
Create AccountLog in
Avatar of Tek Info
Tek Info

asked on

Check who is logged into specific IP addresses

I would like to check which user(s) are logged into a specific IP address  (internally) on a Windows network.
How can I achieve this via a script or command line?
Avatar of William Fulks
William Fulks
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
To have this information handy, you have to proactively collect it.

You can use a user base GPO that runs a login script
echo "On %date% at %time%, %USERNAME% loged into %COMPUTERNAME% on %sessionname% authorized against %LOGONSERVER^" >>\\server\sharename\recordkeeping_file.

Now on your DHCP server, you have to keep a record of which IP was allocated to which system.

The above is a simple example, you can use vbscript, powershell, etc. to record these in a DB.
You can use SNMP to generate login/logout events as well as IP...
Avatar of Tek Info
Tek Info


Thanks William.