• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

Get the current loged in username of all machines in the network.

Hi,

I want to Get the current loged in username of all machines in the network.

Username > machine name

Regards
Sharath
0
bsharath
Asked:
bsharath
1 Solution
 
canaliCommented:
PsLoggedOn is an applet that displays both the locally logged on users and users logged on via resources for either the local computer, or a remote one. If you specify a user name instead of a computer, PsLoggedOn searches the computers in the network neighborhood and tells you if the user is currently logged on.

http://www.microsoft.com/technet/sysinternals/utilities/psloggedon.mspx
0
 
RobOwner (Aidellio)Commented:
The Microsoft Sysinternals utilities are great for a network admin like yourself.  have a look through all of them as you'll find they can help you answer most questions you have
0
 
bsharathAuthor Commented:
I want to get only the usernames on the machine names which i have in a file.

Machine name > Current logged in user
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Farhan KaziSystems EngineerCommented:
:: ===============
:: READ THIS FIRST
:: ===============
:: * Successful run will generate "LoginReport.txt" file on C: drive root.
:: * Copy and paste following script in notepad and save it with any name having .cmd extension.
:: *** SCRIPT START ***
@Echo OFF
SETLOCAL

IF EXIST C:\LoginReport.txt DEL /F /Q C:\LoginReport.txt
FOR /F "tokens=1 eol=T skip=3" %%c IN ('Net View') Do (
      Echo Querying %%c
      Echo ---------------------- >>C:\LoginReport.txt
    Echo System Name: %%c           >>C:\LoginReport.txt
      Echo ---------------------- >>C:\LoginReport.txt
      PSLoggedOn %%c | Find "/"   >>C:\LoginReport.txt
)
ENDLOCAL
:: *** SCRIPT END ***
0
 
bsharathAuthor Commented:
Any way to scan particular machines in the file?
0
 
bsharathAuthor Commented:
I get this.

----------------------
System Name: \\DEV-CHEN-MRD100          
----------------------
     7/11/2007 8:03:32 AM    DEVELOPMENT\SharathR
     7/22/2007 10:01:21 PM    DEVELOPMENT\SASIKUMARY
     7/22/2007 10:01:59 PM    \\DEV-CHEN-MRD100\ADMINISTRATOR
----------------------

I think it even shows the files accessed.Not only the users logged on locally.Through the console or Mstsc
0
 
Farhan KaziSystems EngineerCommented:
:: ===============
:: READ THIS FIRST
:: ===============
:: * Successful run will generate "LoginReport.txt" file on C: drive root.
:: * Copy and paste following script in notepad and save it with any name having .cmd extension.
:: *** SCRIPT START ***
@Echo OFF
SETLOCAL

IF EXIST C:\LoginReport.txt DEL /F /Q C:\LoginReport.txt
FOR /F "tokens=1 eol=T skip=3" %%c IN ('Net View') Do (
    Echo Querying %%c
    Echo ------------------------------ >>C:\LoginReport.txt
    Echo System Name: %%c        >>C:\LoginReport.txt
    Echo ------------------------------ >>C:\LoginReport.txt
    PSLoggedOn %%c -l | Find "/"  >>C:\LoginReport.txt
)
ENDLOCAL
:: *** SCRIPT END ***
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now