' Questa funzione mostra tutti gli eventi con lo stesso ID, occhio a sbloccarla perché i messaggi vengono mostrati tramite MSGBOX e potrebbero essere moltissimi. Sostituire l'ID 6005 contenuto in riga 29 con quello desiderato. ' In caso di errore da prompt dei comandi lanciare un "taskkill /IM wscript.exe /F" (senza virgolette) per bloccare l'esecuzione dello script Public Function ShowServicesEvent() Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime") strComputer = "." count = 0 Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colServiceEvents = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'System' and EventCode = '6005'") For Each strEvent in colServiceEvents dtmConvertedDate.Value = strEvent.TimeWritten Wscript.Echo dtmConvertedDate.GetVarDate Wscript.Echo strEvent.Message Next End Function