Random Project

Error in Script

Hi Guys,

there is an Error in your Script. If you set the warning ord critical date to for example 30 and 60 Days, the script will work until the days since last update is excactly 30 or 60 days. 31 or 61 or 29 or 59 will work.

You have to modify your if and elseif at the end to = insted of

See here the edited code snipped:

If DD >= updateTresholdCritical Then
Wscript.Echo “CRITICAL: Patches are not applied for the last ” & DD & ” days.”
Wscript.Quit(intCritical)

ElseIf DD >= updateTresholdWarning Then
Wscript.Echo “WARNING: Patches are not applied for the last ” & DD & ” days.”
Wscript.Quit(intWarning)

ElseIf DD =