Solved

logging users what computer they login on to a text file

Posted on 2007-03-19
7
189 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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Server Backup - full/normal versus fast 15 46
Performance logs and alerts 6 30
Problem to file 5 29
Change default Permissions for windows services 9 15
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

828 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