SMS WQL for for Computers Pending a Reboot
Collections seem to be on our mind, all the time, so here's another to help reboot those pesky non-rebooters. This WQL will give you all your reboot pending computers, so you can send them a reboot package. Ha! Take that, non-rebooters!
----Begin WQL----
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_G_System_PatchStatusEx on SMS_G_System_PatchStatusEx.ResourceID = SMS_R_System.ResourceId
Where SMS_G_System_PatchStatusEx.LastStateName = "reboot pending"
----End WQL----
About the Author
Emmanuel Tsouris is a Systems Management veteran and Developer Advocate specializing in PowerShell and Cloud Automation. He maintains DotVBS to preserve legacy knowledge for the "archaeologist admin."
Ready to move from VBScript to the Cloud? Check out his book, Pro PowerShell for Amazon Web Services.
Visit EmmanuelTsouris.com for his latest projects.
As an Amazon Associate, I earn from qualifying purchases at no cost to you.
Comments