I get asked about this every once in a while so I thought I would post it here in case it’s something you might find helpful as well. This report will contain the last login time on a particular computer along with the user who logged in to it as well as some additional details.
To create the report follow the steps below:
1. Edit the SMS_DEF.mof file to enable the following class:
Network Login Profile
Also enable the sub class:
LastLogon
2. Create a report with the below query: Select V_GS_SYSTEM.Name0 as [ComputerName], V_GS_NETWORK_LOGIN_PROFILE.TimeStamp as [Last Login Time], V_GS_NETWORK_LOGIN_PROFILE.Name0 as [Logon User], V_GS_SYSTEM.Domain0 as [Logon Domain], V_GS_SYSTEM.SystemRole0 as [System Role], V_GS_SYSTEM.SystemType0 as [System Type] from V_GS_NETWORK_LOGIN_PROFILE left JOIN v_GS_SYSTEM ON V_GS_NETWORK_LOGIN_PROFILE.ResourceID = v_GS_SYSTEM.ResourceID where V_GS_NETWORK_LOGIN_PROFILE.LastLogon0 is not NULL
Hope this helps,
Arnab Mitra | Configuration Manager Support Engineer
Thank you very much for this.
It seems to be capavle of doing what I need
However I am only getting a partial Listing. put f over 1500 Computers and 2100 Users I am only seeing 1 result .
I set the above Class and Subclass to TRUE in the SMS_DEF.MOF file. what am I doing wrong.
This query will not show every computer, but every user, and when they logged on for the last time...If a user logs on to 3 different computers, and no one logs on after him, only the last computer will be shown, and the other 2 will not be visible...
I have 20,000 computers, but my report shows 60,000 entries.
In your note below you said "...If a user logs on to 3 different computers, and no one logs on after him, only the last computer will be shown, and the other 2 will not be visible..."
Does this imply that I have a bunch of users that are logging onto many computers and that the duplicates are showing up because of that?
I am using a query similar to this but it shows 1 entry for every person who has logged onto a computer(the last time they logged on).
I have it sorted so by computer name and then with newest logon date at the top, so that if I export it to Excel I can simply remove duplicates and the one that remains is the latest.
However, I would like my SQL query to remove the duplicates so it shows me only 1 computer and the very last user that logged onto that computer.
Select
DISTINCT V_GS_SYSTEM.Name0 as [ComputerName],
V_GS_NETWORK_LOGIN_PROFILE.LastLogon0 as [Last Login Time],
V_GS_NETWORK_LOGIN_PROFILE.Name0 as [Logon User],
V_GS_SYSTEM.Domain0 as [Logon Domain],
V_GS_SYSTEM.SystemRole0 as [System Role],
V_GS_SYSTEM.SystemType0 as [System Type]
from V_GS_NETWORK_LOGIN_PROFILE
left JOIN v_GS_SYSTEM ON V_GS_NETWORK_LOGIN_PROFILE.ResourceID =
v_GS_SYSTEM.ResourceID
where V_GS_NETWORK_LOGIN_PROFILE.LastLogon0 is not NULL
AND
V_GS_SYSTEM.SystemRole0='Workstation'
Order by V_GS_SYSTEM.Name0, V_GS_NETWORK_LOGIN_PROFILE.LastLogon0 DESC
I have systems that do not seem to be updating the Network Profile last logon timestamp data point at all.
How I can I either force them to send it in or troubleshoot why they are not?
I have current software and hardware scans on machine but no new Network Profile data.
Thanks.