Who is logged into remote workstation

G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

I'm looking for a way to determine who is logged into remote computers
running Win2k and Win XP Pro. I am currently attempting this on a Win2k
machine but will be migrating to Win XP Pro sometime in the future. I am the
workgroup manager and have admin access to all the systems under my control.
I've used nbtsta -a to great affect but it's time consuming when you're
talking about 100+ machines. I'd like to see if there is a faster way or a
way to automate it and have the results print out to a file. Can anyone
provide some help?
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

On Tue, 12 Jul 2005 15:04:02 -0700, "MentalDrow" <MentalDrow@discussions.microsoft.com> wrote:

>I'm looking for a way to determine who is logged into remote computers
>running Win2k and Win XP Pro. I am currently attempting this on a Win2k
>machine but will be migrating to Win XP Pro sometime in the future. I am the
>workgroup manager and have admin access to all the systems under my control.
>I've used nbtsta -a to great affect but it's time consuming when you're
>talking about 100+ machines. I'd like to see if there is a faster way or a
>way to automate it and have the results print out to a file. Can anyone
>provide some help?

See tip 4712 » PsLoggedOn freeware tells you who is logged onto a computer, or it can locate a user.
in the 'Tips & Tricks' at http://www.jsifaq.com

What is the name of your workgroup? Run
net view /domain
and it should be listed.

Assuming your workgroup was name WORKGROUP, try the following batch:

@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "Tokens=1" %%c in ('net view /DOMAIN:WORKGROUP ^|FIND "\\"') do (
set usr=%%c
set usr=!usr:\=!\
for /f "Tokens=*" %%u in ('PsLoggedOn -L %%c^|FIND /I "!usr!"') do (
@echo %%c %%u
)
)
endlocal\

This should return every logged on user in the following format:
\\JSI003 07/10/2005 11:28:14 JSI003\Jerry