how to pull the Last Logged in user of the Asset?

Mr_Vin
Kilo Expert

Hi Folks,

We are using SCCM 2012 V2. I am very interested to pull the last logged in user to every asset. Is there any source field available in SCCM computer Identity import set or Is there anyway to get this information to all computer assets?

Any help/suggestions are much appreciated.

Thanks in advance!

Vinod.

5 REPLIES 5

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

As I understand without being a SCCM expert is that there isn't that. closest thing is the "lastlogonuser" but that can fool you since it is the last logged on user when the SCCM client had a "heartbeat". Meaning basically when the client did something active, like check for updates etc. if noone was logon at that time, the attribute is empty.



Googling thou shows signs that you can make a custom query to SCCM to get a whole list of logged on users on a computer and then I guess you can take the lasted logged in of them.




//Göran


I am just a beginner Goran. Thanks for the idea....Skål! Tack!


akash_mehta
ServiceNow Employee
ServiceNow Employee

Vinod:   This is what I normally do with the SCCM mappings...



1)   Create a new field on the Computer table for "Last Logged On User" - map the username mapping (currently in the OOB SCCM)


2)   Create a new field on the Computer table for "Identified Primary User" - map the top console user value (v_GS_SYSTEM_CONSOLE_USAGE.TopConsoleUser0)



3)   OPTIONAL - Comment out the OOB mapping for Assigned_to - let your asset management processes set this



-Akash


Thanks for writing Akash, but I am confused. Correct me if am wrong...


So, you want me to delete the username(SCCM) - Assigned to( cmdb_ci_computer) mapping and do it as username - Last Logged On User. How can we get the Assiged_to field populate then? also if person B logged into person A's laptop(Laptop-A), will the v_GS_SYSTEM_CONSOLE_USAGE.TopConsoleUser0 brings me Person B as the last logged in user on Laptop-A?



--Vinod