Solved

logging users what computer they login on to a text file

Posted on 2007-03-19
7
188 Views
Last Modified: 2010-04-16
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
Comment
Question by:cknoderer
  • 5
7 Comments
 
LVL 22

Accepted Solution

by:
Christopher McKay earned 400 total points
ID: 18750655
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
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18750688
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
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18750701
sorry, that should be "..reflecting the users and such into the usernames's text file."
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Author Comment

by:cknoderer
ID: 18751195
I got it working.  How would you overwrite the file so that the information is more correct?  
0
 
LVL 22

Assisted Solution

by:Christopher McKay
Christopher McKay earned 400 total points
ID: 18751308
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
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 100 total points
ID: 18751768
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
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18756961
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problems with Microsoft.DHCP.PowerShell.Admin Module 4 52
Password recovery software 4 25
facebook change 4 34
see android hidden files 10 24
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question