'This script is called from OD Windows Servers Task Scheduler '10 minutes before the 2AM reboots that occur on Sunday 'It sends out an email to od-dba@qad.com and netsupport@viawest.net 'notifying of the pending shutdown. 'mcp@qad.com Set fso=CreateObject("Scripting.FileSystemObject") Set objNetwork = WScript.CreateObject("WScript.Network") hostName = objNetwork.ComputerName currentTime = Now strSMTP="smtp.odqad.com" strSubject= hostName & " is going down for reboot" strRecipient="od-dba@qad.com,netsupport@viawest.net" strSender="od-dba@qad.com" strBody=hostName & " is going down for reboot in 10 minutes. Current time is " & currentTime & "." 'strAttach="{EnterAttachmentPath}" Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTP .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With With iMsg Set .Configuration = iConf .To = strRecipient .CC = "" .BCC = "" .From = "<" & strSender & ">" .Subject = strSubject .TextBody = strBody '.AddAttachment strAttach .Send End With Set iMsg = Nothing Set iConf = Nothing