From: max98037 on
This has been a long time frustration of mine with Windows networks.

I have yet to find a way to tell which workstation a user is currently
logged into.
Has anyone out there solved this or found something I've just overlooked for
so long?

Perhaps a very handy script?
From: max98037 on
Thank you

"JHP" wrote:

> This works... also find attached script (rename to *.vbs) that gets all the
> computer names from the DC - Pings them to see if they can be reached - runs
> the following script to get the current logged on user - creates an XML file
> at C:\ called Users.xml:
>
> ***Depending on the size of your Network it may take awhile***
>
> Option Explicit
>
> Dim strComputer, objWMI, objProcess, rtnProcess, strUser, strDomain
>
> strComputer = "."
> Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set objProcess = objWMI.ExecQuery("SELECT * FROM Win32_Process")
>
> For Each rtnProcess in objProcess
> If rtnProcess.Name = "explorer.exe" Then
> rtnProcess.GetOwner strUser, strDomain
> WScript.Echo strUser & " " & strDomain
> Exit For
> End If
> Next
> Set objProcess = Nothing
> Set objWMI = Nothing
>
> "max98037" <max98037(a)discussions.microsoft.com> wrote in message
> news:24E1C83A-C57C-42EE-9EEA-61996C43AD4B(a)microsoft.com...
> > This has been a long time frustration of mine with Windows networks.
> >
> > I have yet to find a way to tell which workstation a user is currently
> > logged into.
> > Has anyone out there solved this or found something I've just overlooked
> > for
> > so long?
> >
> > Perhaps a very handy script?
>
>
>
From: RaveDJ on

"max98037" <max98037(a)discussions.microsoft.com> wrote in message
news:24E1C83A-C57C-42EE-9EEA-61996C43AD4B(a)microsoft.com...
> This has been a long time frustration of mine with Windows networks.
>
> I have yet to find a way to tell which workstation a user is currently
> logged into.
> Has anyone out there solved this or found something I've just overlooked
> for
> so long?
>
> Perhaps a very handy script?

Hi,

Although not always 100% reliable, I tend to remotely ask the PDCe (or other
major file server where everyone could be connected) for a session list and
find from there:

PSEXEC \\<server> NET SESSION | FIND "<part of username>"
(or RCMD, a longtime favourite of mine)

eg.

PSEXEC \\server5 NET SESSION | FIND "AC"

might return:

\\PC101 BACKUP Windows 2002 Serv 3 00:00:00
\\PC203 BACKMAN Windows 2002 Serv 0 00:04:00
\\PC222 RACKmon Windows 2000 Serv 3 00:00:00

Alternatively, the other SysInternals' product PSLOGGEDON can enumerate all
sessions on all machines, but it's probably slower than the above VBScript
from JHP (which I'm saving for a day I need it).

Dave


 | 
Pages: 1
Prev: Runas
Next: German VBS Problem