We help IT Professionals succeed at work.

Tools that will notify me once after my MS Windows server 2008 R2 has been rebooted.

Stanley Lai
Stanley Lai asked
on
Hi,

Would like to know whether there is a tool that can notify me (via email or SMS) once after my PC or server has been rebooted accidentally?

Since I found one of my personal server (MS Server 2008 R2) will be rebooted several times a day without any understandable reasons in the Windows event log.  Of course, this need to be solve rather than just monitoring.  But before that, I need to know when it has been rebooted.  Since there is a program that need to run constantly on the server, if it has been rebooted, I need to RDP that server and at least login and run the program again.  May I know whether any tools that can notify me once after my server has been rebooted?  Thanks a lot.

Stanley
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
IT Consultant
CERTIFIED EXPERT
Commented:

Run command prompt to check the booting time: 

systeminfo | find /i “Boot Time”


You can refer the event id 1074, 

https://web.archive.org/web/20160519064523/https://www.microsoft.com/technet/support/ee/transform.aspx?ProdName=Windows%20Operating%20System&ProdVer=5.2&EvtID=1074&EvtSrc=User32&LCID=1033


To see the reason why the server rebooted: 

https://docs.microsoft.com/en-us/windows/win32/shutdown/system-shutdown-reason-codes?redirectedfrom=MSDN


also try this script:

c:\Scripts\sendemail.exe -f localadmin@domain.com -t alerts@yourdomain.com;alerts2@yourdomain.com -u "SERVERNAME rebooted" -m "SERVERNAME has rebooted!" -s smtp.ispsmarthost.com


https://community.spiceworks.com/scripts/show/1902-send-e-mail-alert-when-server-has-rebooted

NVITEnd-user support
CERTIFIED EXPERT

Commented:

Similar to the task scheduler method by Nobus, this way is simple by right clicking event 1074 as Kesavan mentioned, and choosing Attach Task To This Event


http://techgenix.com/attaching-tasks-event-viewer-logs-events/

Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
If this is a VM, you can set it up in VMware vSphere via Alerts on the virtual machine.

You can also use Task Scheduler and create a task to execute (= send an email) at system startup so you get an email notification after the system reboots.
Task Scheduler -> Create Task -> Trigger = At startup -> Action = Send an email

It's also possible to create a task that executes at system shutdown so you will get the email when the server shutdowns. However, it will not work if the system crashes.