Current Users

J

Jason Hurley

Hope this is an easy one for you guys. Question, is there
a way to see only the users currently logged into the
system/AD? Again, I would only like to see the users who
are currently logged on and none of the other logged off
users. Also, is there a way for me to see the server an
active user is currently using resources from?

Thanks as always,
Jason Hurley
 
G

Guest

When users logon to the domain or access resources, they dont necessarly
keep an open connection. During logon the credentials are validated and a
Kerberos ticket is issued. This isn't a staic connection, for example, how
would you handle dropped network connections or power outages on client
machines.
The DC only validates accounts when they are requesting access.

In computer management there is a section for shares, which shows you open
sessions and open files.
 
J

Jerold Schulman

Hope this is an easy one for you guys. Question, is there
a way to see only the users currently logged into the
system/AD? Again, I would only like to see the users who
are currently logged on and none of the other logged off
users. Also, is there a way for me to see the server an
active user is currently using resources from?

Thanks as always,
Jason Hurley

Using PsLoggedOn from tip 4712 in the 'Tips & Tricks' at http://www.jsiinc.com

run the following batch on your workstation:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set dom=%USERDOMAIN%
for /f "Tokens=1" %%c in ('net view^|findstr /L /C:"\\"') do (
for /f "tokens=*" %%u in ('psloggedon -L %%c^|findstr /L /C":/"') do (
set work1=%%u
call set work2=!!work:%dom%=!!
if "!work2!" NEQ "!work1!" @echo %%c %%u
)
)
endlocal

Sample output:

\\JSI001 08/28/2004 18:46:39 JSIINC\Alisa
\\JSI005 08/29/2004 06:23:16 JSIINC\Richard
\\JSI007 08/28/2004 16:51:36 JSIINC\Jennifer
\\JSI009 08/31/2004 08:52:03 JSIINC\Jerry

See tip 6790 for another approach.


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top