Close Menu
    Facebook X (Twitter) Instagram
    Tuesday, May 20
    X (Twitter) LinkedIn
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»SCCM report for computers with last logged on user from collection

    SCCM report for computers with last logged on user from collection

    Eswar KonetiBy Eswar KonetiMarch 28, 10:39 am1 Min Read SCCM 2007 20,163 Views
    Share
    Facebook Twitter LinkedIn Reddit

    You have report to list all computers based on last logged on username from http://eskonr.com/2011/03/sccm-report-to-list-all-computers-based-on-last-logged-on-user-name-from-collection/ .

    In this post,you will get list of computers with last logged on user name from given collection.

    Create a new report and paste the below query into it.

    Select A.Name0, A.UserName0  from V_GS_COMPUTER_SYSTEM A join v_FullCollectionMembership B on A.ResourceID = B.ResourceID Where B.CollectionID =@collID

    Create a prompt for collection ID collID :

    select  CollectionID,Name from v_Collection

    Please refer the post why should u use V_GS_COMPUTER_SYSTEM for user name rather V_R_SYSTEM http://smsug.ca/blogs/garth_jones/archive/2007/06/30/482.aspx

    Computers last logged on user name sccm report SCCM report for computers with last logged on user from collection SQL
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Monitoring Endpoint Security Applications with SCCM ConfigMgr SQL

    October 11, 8:48 pm

    Efficiently Identify Co-Managed Devices: Techniques and Tools

    January 17, 8:37 pm

    SCCM report list collections with no deployments

    December 05, 12:04 pm

    15 Comments

    1. Pingback: eskonr.com sccm login - bankschools.com

    2. Bhaskar Yadav on September 7, 2018 7:43 PM

      Hi Eswar,
      Can you please assist.

      Need a listing of all workstations in SCCM 2012, Last User that logged in, Model of the device, OS of the device and region.

      I'm trying to learn SQL as will be getting a lot of these request, how do I start.

      Reply
      • Eswar Koneti on September 12, 2018 9:28 AM

        Did you try this ? https://gallery.technet.microsoft.com/Configuration-Manager-Most-071cfd38 This might help you.

        Thanks,
        Eswar

        Reply
    3. Prashant Rangdal on August 16, 2017 3:46 AM

      I would like to get a list of all our computers and across each computer I would like to know all users that have been signed on to that computer over the past 30 days

      Reply
      • Eswar Koneti on August 19, 2017 7:22 PM

        You can get this report ,all you need to do is, identify the attribute value for 30 days that store this information and use where like condition.
        I believe you can use computer lastlogon timestamp which may not be the accurate but it comes from active directory .

        Regards,
        Eswar

        Reply
    4. Sooraj Sreenivas on March 23, 2017 6:04 PM

      Hello Eswar

      how to include Primary User details in "Computers with a Specific Operating System" Report?

      Thank you

      Sooraj

      Reply
      • Eswar Koneti on April 5, 2017 8:58 PM

        Hi Sooraj,
        Details do exist in v_r_system and v_r_user ,you can join these 2 tables to get user information.

        Regards,
        Eswar

        Reply
    5. Rad on November 29, 2016 1:44 AM

      I have a list of computers which are not in the same collection and I need to know what usernames are for this list of computers. Would it be a power-shell Script? could you help me with this?

      Reply
      • Eswar Koneti on November 29, 2016 8:45 PM

        Hi Rad,
        You can get the usernames using powershell script but i dont have script readily available. The easiest way for now would be ,add the list of clients into collection and use the report to find username. I will update you with powershell script when i get time.

        Regards,
        Eswar

        Reply
    6. jgq85 on November 8, 2016 12:46 PM

      Hi how do you create this into a report and create a prompt? I am new with SCCM.

      Reply
      • Eswar Koneti on November 9, 2016 4:59 PM

        you can follow this guide http://www.scconfigmgr.com/2014/01/24/create-custom-reports-for-configmgr-2012-with-report-builder/ to create custom report and use the sql code posted in the above.

        Regards,
        Eswar

        Reply
    7. Mark Smith on January 26, 2016 5:54 AM

      Hi Eswar - just found your blog... and quickly subscribed!! 🙂
      I realize this is years after the original post, but I am hoping you can still help.
      My requirement is to produce a CSV-report listing computer name, last logged-on user and all applications installed on the computer.
      I will then query AD using PowerShell to produce a listing of logonID, full username and department.
      That way, I can break down by department the users, computers and applications (to be used for a computer-refresh)
      Many thanks for whatever help/guidance you can provide!
      I'm decent with PowerShell, SQL, etc., but SCCM is new to me.

      Reply
      • Eswar Koneti on April 16, 2016 12:53 AM

        Hi Mark,
        Apologies for the delay ,i know this is almost like 4 months . Have you looked at the default reports for the applications installed on each PC?
        you can get the user name info from v_r_system or V_r_system_valid which you can then export into CSV or any other format you like from SSRS Report.

        Reply
    8. Bob B. on September 26, 2014 8:44 PM

      Can the report be modified to specific workstation? So instead of prompting for a collection, it prompts for a specific workstation? If so, how would you modify the report?

      Thanks!

      Reply
      • Eswar Koneti on September 29, 2014 6:04 AM

        that will be one line query: Select A.Name0, A.UserName0 from V_GS_COMPUTER_SYSTEM A where a.Name0=@woorkstation
        prompt for workstation: select name0 from V_GS_COMPUTER_SYSTEM order by name0

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2024 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.