bcwilhite / PendingReboot

Module to detect Windows OS pending reboots
MIT License
125 stars 26 forks source link

Detecting Reboot Pending From Install/Uninstall-WindowsFeature #4

Open DarwinJS opened 5 years ago

DarwinJS commented 5 years ago

This case does not seem to be handled. I have done the research on how to detect it, but it is based on greping file contents or running Uninstall-feature against something innocuous. I'm not sure if that is in scope for this code since everything in it is currently doable by remote registry calls. Can you please comment on approach and I will know whether I have the time to do a pull request.

bcwilhite commented 5 years ago

@DarwinJS I haven't researched it extensively, but is it possible to query the contents of said file via WMI/CIM call and grep/select-string from there? To keep the function consistent, if a WMI/CIM call will allow file content access, that might be able to work. I would like to know more about what you found.

DarwinJS commented 5 years ago

I actually blogged on a compacted pending reboot test today and in it I mentioned the additional use case: https://cloudywindows.io/post/super-compact-devops-ish-pending-reboot-test-for-the-rebootiest-operating-system-in-the-cloud/