Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

reboot script with email

Posted on 2011-03-18
2
332 Views
Last Modified: 2012-05-11
Can someone please help me with a script which i can set as an automated task which will reboot a server, but send and Email warning 15 minutes prior to reboot?
0
Comment
Question by:alexr54
2 Comments
 
LVL 45

Accepted Solution

by:
Craig Beck earned 500 total points
ID: 35167454
Download a command-line SMTP mailer such as BLAT.  Then create the following BAT file...

BLAT -server <mailserverip> -i <senderaddress> -t <toaddress> -s "Server Restarting..." -body "The server <servername> will restart in 15 minutes!"
shutdown -r -t 900

Obviously change the <mailserverip> to the IP address of a SMTP server on your network, and set the <senderaddress> and <toaddress> to the relevant values.

Schedule that BAT file to run and it should email then restart the server 15 minutes later.
0
 
LVL 2

Author Comment

by:alexr54
ID: 35168073
Thanks. I think that will work, i'll try it out.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question