It's not a good idea to do this in SCCM. SCCM will check each PC for the last logged in user, then display that.
So if there's a PC called XYZ that Alice logged onto on wednesday, and Bob on thursday, you'd only see Bob's login and assume that Alice is inactive.
Querying Active Directory would work better, with a script like
Get-ADUser -Filter * -SearchBase "ou=UserAccounts,dc=contoso,dc=local" -Properties lastLogon | Export-Csv users.csv
That will give you a list of all the user's last domain logon times.
Yes as per the list there is only one inactive client (as per \Monitoring\Overview\Client Status\Client Activity). But in console while viewing all systems there is one more PC which doesn't have any activity. I mean in the activity column nothing is there.
- Edited by don'zz Tuesday, September 10, 2013 12:17 PM
The following code gives the report for inactive clients..
SELECT coll.Name AS NetBiosName, cs.LastMPServerName, cs.LastOnline, coll.SiteCode, cs.LastHealthEvaluation,
(N'CH_LastEvaluationHealthy' + CAST(cs.LastEvaluationHealthy AS NCHAR(1))) AS LastResult,
(N'CH_ClientState' + CAST(cs.ClientState AS NCHAR(1))) AS ClientStateDescription
FROM fn_rbac_FullCollectionMembership(@UserSIDs) coll
LEFT OUTER JOIN fn_rbac_CH_ClientSummary(@UserSIDs) cs ON coll.ResourceID = cs.ResourceID
WHERE coll.CollectionID = @CollID AND cs.ClientActiveStatus = 0
I want to modify this in a way that it should list last logon time also
- Edited by don'zz Wednesday, September 11, 2013 3:05 AM
Refer the query in the link.http://myitforum.com/myitforumwp/2012/03/19/sccm-last-logon-and-other-bigint-att-vs-reporting/
TechNet Community Support
This is a SQL query and has to be run in SQL Management Studio or can be used in a SRS report.
Torsten Meringer | http://www.mssccmfaq.de
- Marked as answer by Juke ChouMicrosoft contingent staff, Moderator Sunday, September 22, 2013 4:40 PM