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

logging users what computer they login on to a text file

I want to add something in the login batch file that will create a text file by either computer name or username that will tell me when they logged in and who is logged into that computer.  I would like to set it up for each individual user as a text file.

Does anyone know how to do this?
0
cknoderer
Asked:
cknoderer
  • 5
3 Solutions
 
Christopher McKayCommented:
What I've done to accomplish this is add this to the logon script:

echo %username% logged onto %computername% on %date% %time% >> \\<server>\<share>\%username%.txt

Hope this helps!

:o)

Bartender_1
0
 
Christopher McKayCommented:
change the items to match your environment: <server> and <share>
the items using % around them are environment variables and will change, reflecting the users and such into the username's profile.

:o)

Bartender_1
0
 
Christopher McKayCommented:
sorry, that should be "..reflecting the users and such into the usernames's text file."
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
cknodererAuthor Commented:
I got it working.  How would you overwrite the file so that the information is more correct?  
0
 
Christopher McKayCommented:
If you want to overwrite the file, you could change the command to this:
echo %username% logged onto %computername% on %date% %time% >\\<server>\<share>\%username%.txt
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
This data is already collected by your server, and you only need to cull the data in order to review it.  I use a 3rd party application for this, which is free in the SBS Environment. (because it's a Single Domain):
http://manageengine.adventnet.com/products/ad-manager/windows-active-directory-logon-reports.html

There may be other ways, there may be other tools, but this one works and it's free.

Jeff
TechSoEasy
0
 
Christopher McKayCommented:
Thanks for the points.

I'm glad we were able to be of some assistance. If you could spare a few minutes, could you tell me how I would have been able to help you better? (What could I have done to earn an "A" grade, rather than a "B" grade?) This will enable me to better assist others in the future.

:o)

Bartender_1
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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