Fig-1: Pending Restart after windows update install
Windows created a registry subkey RebootRequired under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\ to detect this pending state.
So, for easy job, I wrote the little batch script (for windows XP & Server 2003) and powershell script (for Windows Vista & Server 2008 or later) to detect this key. Use either of the script.
Fig-2 & Fig-3 shows running the batch script on computer which needs pending restart & which doesn't.
Fig-2: This computer is pending restart
Fig-3: This computer doesn't need reboot
The Fig-4 & Fig-5 shows the script written in powershell to detect pending reboot.
Fig-4: This computer need pending reboot
Fig-5: This computer does not need pending reboot
how can we put this function in loop to go through all windows servers in Active directory ? then get the result in list
ReplyDeletethank you