That's the same one I use and it works for me. I have another method that uses 
a DCM baseline and checks several different sources (Windows Updates, 
PendingFileRenameOperations, and WMI). I downloaded it from the web. I can try 
and find it again or export mine if you'd like.

From: [email protected] [mailto:[email protected]] On 
Behalf Of Ryan Shugart
Sent: Tuesday, May 19, 2015 12:27 PM
To: [email protected]
Subject: [mssms] query to return machines with pending reboots

Hi:
        I'm looking for a query to return machines with a pending reboot from 
Windows Updates.  I've found a query online:
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
But this isn't returning any results, and I know there should be some there.  
Does anyone have a query to return machines with a reboot pending?  This is 
SCCM 2012R2 CU4.
Thanks.
Ryan

Ryan Shugart
LAN Administrator
MiTek USA, MiTek Denver
314-851-7414


MiTek Holdings, Inc., 2011-2014, All Rights Reserved
  ________________________________
This communication (including any attachments) contains information which is 
confidential and may also be privileged. It is for the exclusive use of the 
intended recipient(s). If you are not the intended recipient(s), please note 
that any distribution, copying, or use of this communication or the information 
in it is strictly prohibited. If you have received this communication in error, 
please notify the sender immediately and then destroy any copies of it.

________________________________

Confidentiality Notice: This e-mail is intended only for the addressee named 
above. It contains information that is privileged, confidential or otherwise 
protected from use and disclosure. If you are not the intended recipient, you 
are hereby notified that any review, disclosure, copying, or dissemination of 
this transmission, or taking of any action in reliance on its contents, or 
other use is strictly prohibited. If you have received this transmission in 
error, please reply to the sender listed above immediately and permanently 
delete this message from your inbox. Thank you for your cooperation.



Reply via email to