In
I am trying to get a list of users and IP addresses of the system(s)
they are curently logon. Is it possible to get this information from
the Active Directory/Domain controller.
I know I can get a list of users and computers separately. Is it
possible to link users to the IP addresses ho system they logon at a
given time.
Thanks!
Daljit Singh
Number of options, non of which are native to the OS:
1. You can use srvmgr (NT style), which is available in the resource kit.
2. You can do an nbstat -a <machinename> against the machine in question
and you should see the <03> record of any user logged in on that PC.
3. Or you can use WMI. This below was posted awhile back.I have not tried
it, therefore I cannot answer any questions regarding syntax errors.
/begin repost:
_______________________________________
From: "MadDHatteR" <
[email protected]>
Newsgroups: microsoft.public.win2000.active_directory
Sent: Monday, August 04, 2003 8:13 PM
Subject: Re: Who is logged in at a remote workstation
WMI provides a nice way of doing this. A VBScript example:
strComputer = WScript.Arguments(0)
Set wbemServices = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2") Set wbemObjectSet =
wbemServices.InstancesOf("Win32_ComputerSystem")
For Each wbemObject In wbemObjectSet
WScript.Echo "Current User: " & wbemObject.UserName
Next
If you saved the above as currentuser.vbs, you could call it from
command-line as:
cscript currentuser.vbs <computername-to-check>
Or, you could change strComputer to be the name of the computer to
check.
____________________________________
/end repost
There are other scripts you can possibly use at Microsoft's Script Center at
www.technet.com, or you can visit
http://cwashington.netreach.net for
thousands of free scripts and I'm sure one or two will do what you are
looking for.'
--
Ace
This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.
If this post is viewed at a non-Microsoft community website, and you were to
respond to it through that community's website, I may not see your reply
unless that website posts replies back to the original Microsoft forum.
Therefore, please direct all replies ONLY to the Microsoft public newsgroup
this thread originated in so all can benefit or ensure the web community
posts it back to the original forum.
Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Windows Server Directory Services
Microsoft Certified Trainer
Infinite Diversities in Infinite Combinations.
=================================