Forum Discussion
Is my server pending reboot?
I wonder if anyone has any ideas on finding, using powershell, if a server is planning on rebooting anytime soon?
I can find out if a reboot is due for windows updates and a few other possible reasons, using powershell but if a reboot is waiting from running shutdown -r -t nnnnn then none of the places I know to look are helpful. Even Windows Admin Centre does not seem to know the server has a reboot pending. I have looked in Event viewer for a system log event ID13 but that may or may not tell me anything about an upcoming reboot.
A shutdown -a knows if a reboot is pending or not (it errors if not) but I can't find out where to look to find this information myself.
Any Ideas please?
Something here might help.
How to Find Restart Info Using PowerShell and Windows Event Logs - WhatsUp Gold
Something here might help.
How to Find Restart Info Using PowerShell and Windows Event Logs - WhatsUp Gold
- Peter_BWCopper Contributor
Dave Patrick Thanks that does help - I was using get get-eventlog to try and look at event ID13 and that was really not helpful.
Get-WinEvent is much more useful and actually returns the date and time of the scheduled reboot, and the reason.
Many thanks for that
Glad to hear it helps. Please don't forget to mark helpful replies.