Lidt hjælp til dette script
Hejsa...jeg mener dette er noget Basic script.Scriptet undersøger om man mangler nogle opdateringer til Ms IIS 5.0
// NOTIFY.JS
// Description:
// Notify.js can be customized by the user
// Right now it reports a missing hotfix on commandline and writes an event to the eventlog
// But it is also possible to generate a mail, halt IIS or generate other events that are
// relevant to administrators.
function Notify(type,sBulletin, sTitle, sLink, sMachine)
{
var oShell = new ActiveXObject(\"WScript.Shell\");
switch(type)
{
// consts (for instance HOTFIX) are declared in HFCHECK.WSF
case HOTFIX:
WScript.Echo(\"\\nMissing Hotfix on Machine \" + sMachine + \" Detected:\\nMicrosoft Security Bulletin (\" + sBulletin + \")\\n\" + sTitle + \"\\nLink: http://www.microsoft.com\" + sLink);
oShell.LogEvent(2,\"Missing Hotfix on Machine \" + sMachine + \" Detected:\\nMicrosoft Security Bulletin (\" + sBulletin + \")\\n\" + sTitle + \"\\nLink: http://www.microsoft.com\" + sLink);
break;
case WORKAROUND:
WScript.Echo(\"\\nWorkaround Notification for Machine \" + sMachine + \":\\nMicrosoft Security Bulletin (\" + sBulletin + \" )\\n\" + sTitle + \"\\nLink: http://www.microsoft.com\" + sLink);
oShell.LogEvent(2,\"Workaround Notification for Machine \" + sMachine + \":\\nMicrosoft Security Bulletin (\" + sBulletin + \" )\\n\" + sTitle + \"\\nLink: http://www.microsoft.com\" + sLink);
break;
case MISSINGINFO:
WScript.Echo(\"\\nHotfix Warning for Machine \" + sMachine + \":\\nUnable to verify hotfix install \\nMicrosoft Security Bulletin (\" + sBulletin + \")\\nLink: http://www.microsoft.com\" + sLink);
oShell.LogEvent(2,\"Hotfix Warning for Machine \" + sMachine + \":\\nUnable to verify hotfix install \\nMicrosoft Security Bulletin (\" + sBulletin + \")\\nLink: http://www.microsoft.com\" + sLink);
break;
}
}
MS skriver så at man kan adde følge til scriptet for at få det til at sende en mail til en, når der mangler en hotfix...
Set objMsg = CreateObject(\"CDONTS.NewMail\")
\'Set the properties of the Message
objMsg.From = \"HotfixNotification@YourCompany.com\"
objMsg.To = \"Administrators@YourCompany.com\"
objMsg.Subject = \"Missing Hotfix Detected!\"
objMsg.Body = \"Microsoft Security Bulletin _
(\" + sBulletin + \") \" + sTitle + \" Link:
_http://www.microsoft.com\" + sLink
objMsg.Send
Men hvor skal dette indsættes for at virke ?
Martin
