locked
Report or request for SCCM 2012 computers that require a reboot. RRS feed

Answers

  • Hi , Below is the SQL query for identify the computer name that need a reboot due to patching.  -- SCCM 2012

    select top 10 * from v_AssignmentState_Combined

    join v_R_System vrs on vrs.ResourceID=v_AssignmentState_Combined.ResourceID

    where StateID='5'


    BR// Praveen Sharma B.Tech (E&C), MCSE,MCTS (Exchange)




    Saturday, October 6, 2012 11:59 AM

All replies

  • Not quite sure as of in 2012 - been looking a little around and havent seen anything yet ... You might need to pick up the data actively via hardware inventory.

    Rod Trent have written this @ myITforum http://myitforum.com/myitforumwp/2012/06/27/inventorying-systems-that-are-pending-reboots/

    Make sure you do lab testing if you decide to alter your inventory definitions!


    - Stress is the confusion created in one's mind, to override the basic desire to choke the living %&¤# out of someone, who deserves it the most. Twitter: http://twitter.com/#!/@henrikhoe

    Tuesday, August 14, 2012 2:51 PM
  • Hi , Below is the SQL query for identify the computer name that need a reboot due to patching.  -- SCCM 2012

    select top 10 * from v_AssignmentState_Combined

    join v_R_System vrs on vrs.ResourceID=v_AssignmentState_Combined.ResourceID

    where StateID='5'


    BR// Praveen Sharma B.Tech (E&C), MCSE,MCTS (Exchange)




    Saturday, October 6, 2012 11:59 AM
  • Not sure if you ever got this working, but here is the 2012 collection query I use to see systems that require a reboot.

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from sms_r_system inner join SMS_UpdateComplianceStatus ON SMS_UpdateComplianceStatus.machineid=sms_r_system.resourceid WHERE SMS_UpdateComplianceStatus.LastEnforcementMessageID = 9

    Thursday, April 18, 2013 4:05 PM
  • SELECT DISTINCT
                          dbo.v_GS_COMPUTER_SYSTEM.Name0 AS Servidor,
    CONVERT(VARCHAR(10),os.LastBootUpTime0,101) AS [Bootup Time],
       Datediff(dd, os.LastBootUpTime0, GetDate()) AS [Days Since Last Reboot]
    FROM  dbo.v_GS_PatchStatusEx
     INNER JOIN  dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_GS_PatchStatusEx.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID
    INNER JOIN v_FullCollectionMembership on (v_FullCollectionMembership.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID)
       LEFT JOIN dbo.v_GS_Operating_system AS os
          ON dbo.v_GS_COMPUTER_SYSTEM.ResourceID = os.resourceID
    WHERE (v_FullCollectionMembership.CollectionID = 'SMS000DS') AND(LastState=102)
    ORDER BY [Days Since Last Reboot] DESC, Servidor ASC
    Thursday, September 26, 2013 10:01 AM
  • Hi,

    I have tried this on a collection in 2012 as a WQL Query but it appears that there is an error in the statement as from what I can see the Update Compliance class does not exist.

    Did you extend any classes to pick this up?

    Thanks

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from sms_r_system inner join SMS_UpdateComplianceStatus ON SMS_UpdateComplianceStatus.machineid=sms_r_system.resourceid WHERE SMS_UpdateComplianceStatus.LastEnforcementMessageID = 9

    Sunday, May 11, 2014 7:03 PM
  • Does anybody know what action initiates SMS_UpdateComplianceStatus.LastEnforcementMessageID update?
    Wednesday, June 3, 2015 10:23 AM