passthru.vbs
来自「James Antognini和Tom Divine提供的PASSTHRU的编成」· VBS 代码 · 共 40 行
VBS
40 行
REM Note that missing classes in log file mean tthe hat WMI cannot access them.
REM Most likely this indicates a problem with the driver.
REM See %windir%\system32\wbem\wmiprov.log and nt eventlog for more details.
REM You could also delete the line On Error Resume Next and examine the
REM specific VBScript error
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile(".log", True)
Set Service = GetObject("winmgmts:{impersonationLevel=impersonate}!root/wmi")
Rem PassthruStatistics -
Set enumSet = Service.InstancesOf ("PassthruStatistics")
a.WriteLine("PassthruStatistics")
for each instance in enumSet
a.WriteLine(" InstanceName=" & instance.InstanceName)
a.WriteLine(" instance.Count=" & instance.Count)
a.WriteLine(" instance.MPSendPktsSeen=" & instance.MPSendPktsSeen)
a.WriteLine(" instance.MPSendPktsDropped=" & instance.MPSendPktsDropped)
a.WriteLine(" instance.PTRcvSeen=" & instance.PTRcvSeen)
a.WriteLine(" instance.PTRcvDropped=" & instance.PTRcvDropped)
a.WriteLine(" instance.PTRcvPktsSeen=" & instance.PTRcvPktsSeen)
a.WriteLine(" instance.PTRcvPktsDropped=" & instance.PTRcvPktsDropped)
next 'instance
Rem PassthruIPAddrArray -
Set enumSet = Service.InstancesOf ("PassthruIPAddrArray")
a.WriteLine("PassthruIPAddrArray")
for each instance in enumSet
a.WriteLine(" InstanceName=" & instance.InstanceName)
a.WriteLine(" instance.NumberElements=" & instance.NumberElements)
for i1 = 0 to (instance.NumberElements-1)
a.WriteLine(" instance.IPAddrArray("&i1&")=" & instance.IPAddrArray(i1))
next 'i1
next 'instance
a.Close
Wscript.Echo " Test Completed, see .log for details"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?