How to Get IP Addresses of User In Active Directory Domain

active-directoryip

I am trying to find IP address(es) of active directory user.
If a user is logged in into multiple computers then I need to find all IP address(es) of those machines.

I have tried to get the computer name from which user is logged in by comparing their logged on time. I am not sure this is proper approach.
I am using VC++

Best Answer

The data you're trying to retrieve is not natively stored in Active Directory objects. You're looking for 2 parts:

  1. What systems is the user logged in to
  2. What is the IP address of those systems

The IP address of the computer can be retrieved from AD using the Get-ADComputer cmdlet with properties IPv4Address and IPv6Address - however the cmdlet using a simple DNS query to populate those fields and it is not stored in the AD object itself.

Whatever your solution is will require some sort of scripting to obtain the data you need and does not need to involve Active Directory.