Re: Discover user name given IP address or NetBIOS name

From: DalePres (don-t-spa-m-me_at_lea-ve-me-a-lone--.com)
Date: 02/04/05


Date: Fri, 4 Feb 2005 14:04:59 -0600

To do it in VBScript with WMI, use
http://www.microsoft.com/technet/scriptcenter/scripts/desktop/logon/dmlgvb02.mspx

After looking at that, look at the WMI and System.Management classes in the
.Net framework.

To get the user, make sure you set a reference to System.Management.dll

There's a pretty good article at
http://www.csharphelp.com/archives3/archive584.html. Be sure to look for
part II of the article at
http://www.csharphelp.com/archives3/archive585.html for more specific
details.

Hope this helps,

DalePres
MCAD, MCDBA, MCSE

<rdonnici@gmail.com> wrote in message
news:1107539997.623486.289980@z14g2000cwz.googlegroups.com...
> Hi all,
>
> Is there any way to, given an IP address(or NETBIOS machinename - I can
> convert from one to other) from my network, and assuming that everyone
> needs to log on a NT/2K/Windows Server 2003 Server, to discover the
> user name for the user logged on that machine? The final result
> desired is something like a table, with pairs [IP(or NB machnename),
> username] at the moment the program is run.
>
> Any ideas? I have hunted high and low on the newsgroups and have not
> found any kind of solution.
>
> Thanks in advance,
>
> Rafael
>



Relevant Pages

  • Re: Discover user name given IP address or NetBIOS name
    ... Chapter 8 code samples has some great ... working C# examples of using WMI. ... DalePres ... > Is there any way to, given an IP address(or NETBIOS machinename - I can ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: WMI question
    ... Jm schrieb: ... > I found this code which was designed for VBscript and uses wmi. ... I know under vb you would a refernce to wmi but i cant find how to do ... Integrate WMI into the .NET Framework ...
    (microsoft.public.dotnet.languages.vb)
  • Re: tools
    ... First, WMI has nothing to ... do with VBScript directly. ... to the SDK are broken. ... The original help file, if you can find it, will be named ...
    (microsoft.public.scripting.vbscript)
  • Error in accessing a particular event log through SWbemLocator
    ... I am using WMI to access the event logs in a server. ... MsgBox ... I was wondering if this is causing any VB related problem. ... the same things as the VBScript in the WMI code does. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Good WSH Book
    ... I have that book and a similarly titled one on VBScript (both from Wrox ... WSH "API" and very little has changed since ... WMI is another issue. ...
    (microsoft.public.scripting.wsh)