Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

reboot script with email

Posted on 2011-03-18
2
Medium Priority
?
341 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
[X]
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
2 Comments
 
LVL 47

Accepted Solution

by:
Craig Beck earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You deserve ‘straight talk’ from your cloud provider about your risk, your costs, security, uptime and the processes that are in place to protect your mission-critical applications.
Considering cloud tradeoffs and determining the right mix for your organization.
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…

618 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