Jump to content


j1mmyd3an

Canned Report - Computers for a specific user name

Recommended Posts

Hi there, I've run into an issue with the canned report for "computers for a specific user name".  When I run the report I can only see a partial list of the users in my organization.  I thought it was related to my discovery configuration but my generic "All Users" collection is a complete list of all my users.  I created a query manually using info I found online and it gives the same kind of results.  The query returns results on some users but not all.  This leads me to believe that SCCM hasn't got this data stored in it's database, but it has got the users discovered as displayed in my "All Users" collection.

My question is, can anyone point me in the direction of getting all my user data available to query?  I have no idea why it's only partially working.

Thank you for your assistance, and for running a great forum.

Share this post


Link to post
Share on other sites

10 minutes ago, GarthMJ said:

What does your query look like ?

Hi Garth, thanks for your reply.  Here is the query I found online.

SELECT SMS_R_System.LastLogonUserName, SMS_R_System.Name, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonTimestamp
FROM  SMS_R_System
WHERE SMS_R_System.LastLogonUserName = ##PRM:SMS_R_System.LastLogonUserName##

Share this post


Link to post
Share on other sites

47 minutes ago, GarthMJ said:

This query will only show you computers who last logon user was X.

Thanks Garth, fair enough.  Do you have any ideas as to why my canned report for "computers for a specific user name" wouldn't have any data on a large portion of my users? 

Share this post


Link to post
Share on other sites

Now that I'm back in the office and can look at this.

Both queries will return the same results. Both queries will use the last login user when your Hardware inventory last occurred. If no one was login when HW inventory occurred, it would be null. 

Share this post


Link to post
Share on other sites

5 hours ago, GarthMJ said:

Now that I'm back in the office and can look at this.

Both queries will return the same results. Both queries will use the last login user when your Hardware inventory last occurred. If no one was login when HW inventory occurred, it would be null. 

Thank you for getting back to me, I really appreciate your insight.  What I'm really struggling with is that there are at least 20000 users that aren't represented in this report.  I figured it had to do with my discovery data but as I mentioned before, all my users show up correctly in my "All Users" collection.  At some point I'm sure the HW inventory ran with one of these 20000 users logged on.  I'm just stumped as to where I need to look next.

 

Thanks again for taking the time.

Share this post


Link to post
Share on other sites

53 minutes ago, GarthMJ said:

What is your hardware inventory schedule? Why do you care who was the last user login to the computer? 

Hardware is scheduled to run weekly.  I use this report to locate PCs that a user has logged on to.  It's come in very handy in the past, and when I realized that a huge number of my users aren't listed to run the report against it made me start to question where this was all breaking down. 

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
Reply to this topic...

×   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.