Close Menu
    Facebook X (Twitter) Instagram
    Saturday, October 11
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»SCCM report for computers where no user logged in for past 20 Days

    SCCM report for computers where no user logged in for past 20 Days

    Eswar KonetiBy Eswar KonetiFebruary 16, 12:40 pm1 Min Read SCCM 2007 5,172 Views
    Share
    Facebook Twitter LinkedIn Reddit

    This report gives you list of PCS where no user logged into the computer since 20 days.If the SCCM clients has any issues in sending inventory information to site server,you will see lot of computers though user logged into the computer.

    select
    a.Name0,a.UserName0,TimeStamp from v_GS_COMPUTER_SYSTEM a ,v_FullCollectionMembership b
    where DATEDIFF(dd,a.TimeStamp,GetDate()) > 20 and  b.CollectionID = @ID and a.ResourceID=b.ResourceID

    order by a.Name0

    Prompt for ID: SELECT DISTINCT CollectionID, Name FROM v_Collection

    Configmgr 2007 configmgr report Microsoft SCCM SCCM SCCM 2007 SCCM report for computers where no user logged in for past 20 Days SCCM Reports SMS SQL System center configuration Manager
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    8 Comments

    1. nawaz.kazi on September 25, 2014 1:08 AM

      i have done one modificationa do you think its worth

      select
      a.Name0,a.UserName0,TimeStamp from v_GS_COMPUTER_SYSTEM a ,v_FullCollectionMembership b
      where DATEDIFF(dd,a.TimeStamp,GetDate()) > 20 and b.CollectionID = 'sms00001' and a.ResourceID=b.ResourceID
      and a.UserName0 is NULL
      order by a.UserName0

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

        yes,it is.aviod null values helps to to get right information.

        Reply
    2. abdul on August 31, 2013 6:13 PM

      Eswar ,

      I want the sql query to generate the hostname, username and user login time. coould you able to help to get this result

      Reply
      • Eswar Koneti on September 16, 2013 9:22 AM

        use the SQL views documentation to see where they exists,couple of blogs on the above hostname,username etc on this website.
        http://eskonr.com/2013/04/download-sccm-2012-sql-views-documentation/

        Reply
    3. abdul on August 26, 2013 4:00 PM

      Hi Eswar,

      Could your please help me to know how to generate last login time with hostname based on the collection.

      I have a query in that we can generate the report based on the particular machine.

      Regards,
      Abdul

      Reply
      • Eswar Koneti on August 30, 2013 8:05 PM

        can you post the error msgs ?

        Reply
    4. abdul on August 26, 2013 3:59 PM

      Hi Eswar,
      The qery select
      a.Name0,a.UserName0,TimeStamp from v_GS_COMPUTER_SYSTEM a ,v_FullCollectionMembership b
      where DATEDIFF(dd,a.TimeStamp,GetDate()) > 20 and b.CollectionID = @ID and a.ResourceID=b.ResourceID

      is not giving any result

      Reply
      • Eswar Koneti on August 30, 2013 8:03 PM

        did u also create prompt for collection ?@ID ?
        are you getting any error ?

        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-2025 Eswar Koneti, All rights reserved.

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