Jump to content


  • 0
IT-LAIG

SCCM 2012 Report- user login info

Question

I am a SCCM newbie with no SQL query background and need help with this task. I have been asked in SCCM 2012 to create custom report that shows user login information. They want to be able to see all users and their login timestamp (in a readable form). I really need help with how get this accomplished in Configuration Manager and how do I go about in creating a query. Can somebody please help me with this task

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Can anyone please help me with this... This is the query I have come up with so far and I am getting error when I try to run it against the user collection I have created.

 

SELECT SMS_R_User.UserName,
SMS_R_User.Name, SMS_R_User.lastLogonTimestamp
DATEADD(mi,(lastLogontimeStamp0 / 600000000) - 157258080,0) AS [Last Logon Time Stamp (UTC)]
FROM SMS_R_User.UserName
WHERE User_Name0 LIKE @variable

 

If anyone can help me fix this script, then that would be a big help.

Thanks-

Share this post


Link to post
Share on other sites

  • 0

I'm assuming you are using SCCM 2012? (SP1?) The above looks more like a SCCM 2007 script, the tables have changed slightly in 2012 so the script will not work.

 

I've put together something that should work for you here:

 

http://itguru82-sccm.blogspot.co.uk/2013/03/last-logon-time-report-using-sccm-data.html

 

Hope this helps...

Share this post


Link to post
Share on other sites

  • 0

I hate to tell you itguru1982 this but there are a number of thing wrong with your query.

1) Your join in incorrect. USR.ResourceID != SYS.ResourceID ; you can see this by changing you left join to a right join

2) The Last logon time that you are using is for the PC not the user.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.