SCCM Custom Report - find Last logon user and time
Hi all, How can I get the last logon user and time for a particular machine ? User_Name0 in table v_R_System_Valid and Time Stamp in table v_GS_COMPUTER_SYSTEM seem to be the answer but I am not sure. Thanks for any help.
August 26th, 2009 11:35am

Hi,You have the last bootup time for the computer in V_GS_Operating_SystemKent Agerlund | http://scug.dk/members/Agerlund/default.aspx | The Danish community for System Center products
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2009 12:04pm

The answer is going to depend on your setup. in most people setup the v_GS_Computer_System will display the last logon user that ConfigMgr knows about, but even that will not guarantee to be the last logon user as it will in most cases be up to 24h old. As for the time they logon, this information is not collected by ConfigMgr. if you need this information then you need to look at OpsMgr with ACS. http://www.enhansoft.com/
August 26th, 2009 2:02pm

Thanks Garth, I found a thread did the trick by using table v_GS_SYSTEM_CONSOLE_USER . It gave me lots of null values though compared to v_gs_computer_system .username0 field. Can you please advise if the solution in that thread is correct ? http://stackoverflow.com/questions/997619/sccm-query-how-to-get-latest-user-logon-registration-if-any-and-display-pc-ip
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2009 2:43am

well, this is a slighty different question / answer than your original question. Your original question is regarding last login time for a user. That's why Garth suggested OpsMgr for that specific request.If what you really want is top console user--ie., who the main user of a box probably is--then the Console User Reports and views will help you out there.Why you might be getting nulls... the Console Usage reports do have a pre-requisite, usually accomplished via a GPO, to enable success logon auditing, so that there is something for each computer to report about who uses the computer the most often in the last xx days. That's my guess for the nul values; that GPO isn't in place.Start here: http://technet.microsoft.com/en-us/library/cc161947.aspx, look for " How to Enable Success Logon Event Logging"Standardize. Simplify. Automate.
August 27th, 2009 5:29am

I was using Top Console User, which is already in the out of the box report "Hardware 01A - Summary of computers in a specific collection" The problem was "Top Console User" was only populated 10% or less of the time. Our equipment for the most part is only assigned to one user, so Last Logon User is just fine. I used Garth's suggestion and found using v_gs_computer_system.username0 I was able to get a user name in the report 90 to 95% of the time. I did set Hardware Inventory Client Agent to run every 3 days instead of every 7, but the rate of getting anything useful out of Top Console User did not improve.
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 6:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics