I have written a script which runs at user logon and logoff:
net use L: \\yourservername\dir /U:username password
echo **User Logon** UserName: %USERNAME% ComputerName:%COMPUTERNAME% UserDomain:%USERDOMAIN% UserProfile:%USERPROFILE% System Time: %TIME% System Date: %DATE% Currently Attached to Server: %LOGONSERVER% >>L:\Logon.txt
net use L: /del /yes
It works very well and we now have a log file which logs all of our users logging onto machines and shows them logging off also with times and dates.
Primarily I hadn't made the script to map a network drive but I kept getting "Acess Denied" So it now maps to a drive creates the log and then the script disconnects the map drive and its like it never existed, but if you go to your server and look in the folder where the drive is mapped too you should see a log file.
Obviously you can customize the script to your needs.
I hope this helps you!
There are currently 1 users browsing this thread. (0 members and 1 guests)