locked
Collection based SQL query required for client last enforcement Status RRS feed

  • Question

  • Hi team,

    i need query it show's about Compliant Servers , Install Pending , Pending Restart for one particular collection kindly any one help me on this 


    Thursday, November 1, 2018 3:38 PM

Answers

All replies

  • what exact do you have for this query so far? have you looked at the builtin report already?

    Garth Jones

    Blog: https://www.enhansoft.com/blog Old Blog: https://sccmug.ca/

    Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleashed

    Friday, November 2, 2018 12:07 AM
  • As Garth suggested, I only have access to SCCM Current Branch but I believe this report is in 2012 also:

    Friday, November 2, 2018 12:30 AM
  • actually we have multiple deployments for various collection so i want to complain in one it show show the final enforcement status in one report for that i need a query, building report i have select each deployment and run. 

    i have created the enforcement status query for system but i need it for collection.

    select TOP 1 
    vSMS_R_System.Netbios_Name0,
    vSMS_Update_ComplianceStatus.LastEnforcementMessageID, 
    vSMS_Update_ComplianceStatus.LastEnforcementMessageName, 
    vSMS_Update_ComplianceStatus.LastEnforcementMessageTime
    from vSMS_R_System JOIN vSMS_Update_ComplianceStatus 
    on vSMS_Update_ComplianceStatus.MachineID = vSMS_R_System.ItemKey 
    where Name0 in ('Hostname') ORDER BY LastEnforcementMessageTime DESC

    Friday, November 2, 2018 8:57 AM
  • actually we have multiple software update deployments/ collection so i want to complain in one it show show the final enforcement status in one report for that i need a query, building report i have select each deployment and run. 

    i have created the enforcement status query for system but i need it for collection.

    select TOP 1 
    vSMS_R_System.Netbios_Name0,
    vSMS_Update_ComplianceStatus.LastEnforcementMessageID, 
    vSMS_Update_ComplianceStatus.LastEnforcementMessageName, 
    vSMS_Update_ComplianceStatus.LastEnforcementMessageTime
    from vSMS_R_System JOIN vSMS_Update_ComplianceStatus 
    on vSMS_Update_ComplianceStatus.MachineID = vSMS_R_System.ItemKey 
    where Name0 in ('Hostname') ORDER BY LastEnforcementMessageTime DESC

    Friday, November 2, 2018 8:58 AM
  • thanks guys i have created the query for my requirement 
    Tuesday, November 6, 2018 12:48 PM