Ich hab hier ein kleines Script geschrieben.
Und von euch möchte ich wissen was es macht.
cu
Und von euch möchte ich wissen was es macht.
cu
Code:
On Error Resume Next
intStartingAddress = 50
intEndingAddress = 254
strSubnet = "212.204.97."
For i = intStartingAddress to intEndingAddress
strComputer = strSubnet & i
Set objWMIService = GetObject("winmgmts:" _
& "{(Security)}\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_OperatingSystem")
For Each objItem in ColItems
Wscript.Echo strComputer & ": " & objItem.Caption
Next
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * From Win32_NTLogEvent Where SourceName ='NTFS'")
For Each objEvent in colLoggedEvents
Wscript.Echo "Category: " & objEvent.Category
Wscript.Echo "Event Code: " & objEvent.EventCode
Wscript.Echo "Message: " & objEvent.Message
Wscript.Echo "Record Number: " & objEvent.RecordNumber
Wscript.Echo "Source Name: " & objEvent.SourceName
Wscript.Echo "Time Written: " & objEvent.TimeWritten
Wscript.Echo "Event Type: " & objEvent.EventType
Next
Next