Config Manager 2012. Collection to query rebootsfor Patch management

Any one help me out to create the  pending syatem restart collection based on Patch deployment in SCCM 2012.

October 4th, 2012 11:05am

Hi,

Here is a WQL query..

http://www.sccm-tools.com/tools/wqlqueries/WQLQueries-Patchrestartedneeded.html

Regards,
Jrgen

Free Windows Admin Tool Kit Click here and download it now
October 4th, 2012 11:44am

 Hey Jorgen

Thanks for your quick reply.

The above mention query was working fine in SCCM 2007 however this query is not working in SCCM 2012 :( .

October 4th, 2012 12:06pm

yeah indeed,

I also want to find out the equivalent way to query this in SCCM 2012...


Free Windows Admin Tool Kit Click here and download it now
October 4th, 2012 12:26pm

Hello Guys,, Still looking answer for this.
October 8th, 2012 12:07pm

Try this one:

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 AS sms_r_system inner join SMS_UpdateComplianceStatus as c on c.machineid=sms_r_system.resourceid where c.LastEnforcementMessageID = 9

LastEnforcementMessageID LastEnforcementMessageName

1        Enforcement started

3        Waiting for another installation to complete

6    General failure

8    Installing update

9    Pending system restart

10  Successfully installed update

11  Failed to install update

12  Downloading update

13  Downloaded update

Free Windows Admin Tool Kit Click here and download it now
October 8th, 2012 1:55pm

Hello,

thank you for your help, the device collection works well.

Is there a way to create an email alert if this device collection contains more than zero computers?
Would be very useful to be alerted only if there's need of reboots instead of checking this device collection regularly...

And another question, in some other forum I read about the same way to create this kind of device collection, ony they proposed to insert a DISTINCT into the query to avoid duplicate entries. Is this necessary?

Thanks in advance and best regards,

Markus

July 16th, 2015 11:03am

No need to use "distinct". Colleval handles that automatically.

There's no built-in way to kick off an email if there's >0 members, but it can be scripted using the SDK or some SQL task.

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 1:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics