Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING SCCM Collection to find devices with pending reboot

Harshit Pandey

Well-Known Member
Messages
288
Solutions
8
Reaction score
9
Points
18
Hi,

We are deploying software updates to one of our department users, and these users don't prefer to restart their laptops. We have sent out emails to regularly restart the devices but they don't do it. We don't know how many devices the updates are pending for install and devices that already got the updates but not restarted. Can I create a device collection that checks these laptops to see if there is a pending reboot?

Any help is appreciated.
 
You can use the following WQL query to create a device collection that finds all the devices with pending reboot.
SQL:
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 join sms_combineddeviceresources on sms_combineddeviceresources.resourceid = sms_r_system.resourceid where sms_combineddeviceresources.clientstate != 0

You can also use the other methods covered in this guide: https://www.prajwaldesai.com/find-computers-with-pending-reboot-in-sccm/
 
My advice would be not to speculate on whether reboots are pending, but to let the windows updates control this themselves.
Since every update that requires a reboot returns the exit code 1641, you can use this code to have it triggered by the SCCM client. This then forces the client to perform a reboot.
You need 2 things:
- Software updates must be managed via the SCCM client
- The client policy for "Computer Restart" must be adapted

For the latter; here you specify the times, how much time the user has to perform a restart himself and when the restart will inevitably take place. The SCCM client displays the time remaining until the restart and then carries out the restart automatically if the user does not do it himself.
Here is an example guideline:
1722954673478.png
 
You can use the following WQL query to create a device collection that finds all the devices with pending reboot.
SQL:
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 join sms_combineddeviceresources on sms_combineddeviceresources.resourceid = sms_r_system.resourceid where sms_combineddeviceresources.clientstate != 0

You can also use the other methods covered in this guide: https://www.prajwaldesai.com/find-computers-with-pending-reboot-in-sccm/
Is there an RDL file i can download to import? Or may just be missing it on the link you sent.
 

Forum statistics

Threads
7,130
Messages
27,846
Members
18,145
Latest member
Rothgar
Back
Top