Nice work. For the Windows Update you just need to add the RebootRequired value: HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
The new xPendingReboot module has been released that is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. Download it and have a look at the code in the pms1 module. Some of it was also based on Brian Wilhite's code, the same as the article you referenced. It might give you some further ideas.
I was going to write a function too, but I'll leave that to you to complete :-)
Here's another example: http://billbjerrum.blogspot.com.au/2014/07/posh-script-to-return-compliancy-based.html
I'd like to also see this added to the OSD tasks in SCCM and MDT. Then you're not just adding a reboot for the sake of it. The client will only reboot when needed. A much more intelligent way of doing things!
Cheers,
Jeremy
The new xPendingReboot module has been released that is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. Download it and have a look at the code in the pms1 module. Some of it was also based on Brian Wilhite's code, the same as the article you referenced. It might give you some further ideas.
I was going to write a function too, but I'll leave that to you to complete :-)
Here's another example: http://billbjerrum.blogspot.com.au/2014/07/posh-script-to-return-compliancy-based.html
I'd like to also see this added to the OSD tasks in SCCM and MDT. Then you're not just adding a reboot for the sake of it. The client will only reboot when needed. A much more intelligent way of doing things!
Cheers,
Jeremy