You are here:
ActiveXperts.com > ActiveXperts Network Monitor > WindowsManagement > Scripts > Logs > Plain Text Logs
Quicklinks
NOTE: ActiveXperts Network Monitor ships with a large collection of VBScript scripts to monitor any aspect of your network. Most VBScript scripts also have a PowerShell implementation. Download Now »
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\Windows\Debug\Netsetup.log", _
ForReading)
Do While objTextFile.AtEndOfStream <> True
strLinetoParse = objTextFile.ReadLine
dtmEventDate = Mid(strLinetoParse, 1, 6)
dtmEventTime = Mid(strLinetoParse, 7, 9)
strEventDescription = Mid(strLinetoParse, 16)
Wscript.Echo "Date: " & dtmEventDate
Wscript.Echo "Time: " & dtmEventTime
Wscript.Echo "Description: " & strEventDescription & VbCrLf
Loop
objFSO.Close
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\Windows\System32\DHCP\" _
& "DhcpSrvLog-Mon.log", ForReading)
Do While objTextFile.AtEndOfStream <> True
If inStr(objtextFile.Readline, ",") Then
arrDHCPRecord = split(objTextFile.Readline, ",")
wscript.echo "Event ID: " & arrDHCPRecord(0)
wscript.echo "Date: " & arrDHCPRecord(1)
wscript.echo "Time: " & arrDHCPRecord(2)
wscript.echo "Description: " & arrDHCPRecord(3)
wscript.echo "IP Address: " & arrDHCPRecord(4)
wscript.echo "Host Name: " & arrDHCPRecord(5)
wscript.echo "MAC Address: " & arrDHCPRecord(6)
Else
objTextFile.Skipline
End If
i = i + 1
Loop