Rig remote monitoring and auto restart

I’m planning on using team viewer for remote access but how about auto restart ewfb or windows when Either miner/OS crashes? Are there scripts available or hardware? How about “watchdog” i found on ebay? I would like to be able to start the mining software on start up as well.