VB Script to Reboot Server

VB Script to Reboot Server.

Reboot server and send information mail to user.


SendMail "alerts@extreame-advice.com","nirav@extreame-advice.com", "Server Restarted at" & Now(), "Server Restarted"

Dim objShell
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.run "Shutdown /r /c “00:15” /t 30"
Set objShell = Nothing

Sub SendMail(Sender, Recipient, Subject, Message)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Subject
objMessage.From = Sender
objMessage.To = Recipient
objMessage.htmlbody = Message
objMessage.Send
End Sub

Regards,

Nirav Gajjar