Here's a bat file that will do the same.
The only problem is that it spits out ALL mac addresses instead of just the active one.
Main Topics
Browse All Topicswe have Server 2008 and currently have a user logon vbscript that maps drives for the users based on their ad group assignment. What I would like to add to this script is some lines of code that will capture the computer name of user, the ip of the computer they are logging in from and the date and time they logged in, then append this information to an ongoing log file
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I personally use BGINFO.exe, It's a free MS util "http://technet.microsoft.
Add something like this to a login (or logout) script...
\\server\share\bginfo.exe \\server\share\bginfo.bgi /SILENT /timer:0 /NOLICPROMPT
The bginfo.bgi is an 'ini' file that has all the settings in - including the ability to dump the output to an excel sheet or a database.
The result that I use is an excel sheet with date/username/machine name/os/login server/mac/ip/memoryconfig
Business Accounts
Answer for Membership
by: netcmhPosted on 2009-10-15 at 06:11:25ID: 25580103
Here is a VB script that will read the user name value from active directory and create (or append) a log file.
-The file is saved to a network share.
The file will note the username, computername, MAC address, and the date/time.
The script will also read though the file looking for the username and computername combination. If they are both already logged then the script will just exit since this user is just logging into the same computer again.
If only the computer name is found it will append the log file with the current user's name. This will keep the file from growing out of control.
I find this log helps me to quickly know who is on which computer. The add MAC address also allows me to create and DHCP reservations to the computer.
Select allOpen in new window