Loading |
VBScript |
JavaScript |
Powershell |
Search Options: WMI Win32_PingStatus QueryContent of WMI Win32_PingStatus Query.jsMD5 Hash: 6DF3B5785948E92D2209FA5BC9B8B306 |
||
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20; var arrComputers = new Array("."); for (i = 0; i < arrComputers.length; i++) { WScript.Echo(); WScript.Echo("=========================================="); WScript.Echo("Computer: " + arrComputers[i]); WScript.Echo("=========================================="); var objWMIService = GetObject("winmgmts:\\\\" + arrComputers[i] + "\\root\\CIMV2"); var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PingStatus", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("Address: " + objItem.Address); WScript.Echo("BufferSize: " + objItem.BufferSize); WScript.Echo("NoFragmentation: " + objItem.NoFragmentation); WScript.Echo("PrimaryAddressResolutionStatus: " + objItem.PrimaryAddressResolutionStatus); WScript.Echo("ProtocolAddress: " + objItem.ProtocolAddress); WScript.Echo("ProtocolAddressResolved: " + objItem.ProtocolAddressResolved); WScript.Echo("RecordRoute: " + objItem.RecordRoute); WScript.Echo("ReplyInconsistency: " + objItem.ReplyInconsistency); WScript.Echo("ReplySize: " + objItem.ReplySize); WScript.Echo("ResolveAddressNames: " + objItem.ResolveAddressNames); WScript.Echo("ResponseTime: " + objItem.ResponseTime); WScript.Echo("ResponseTimeToLive: " + objItem.ResponseTimeToLive); try { WScript.Echo("RouteRecord: " + (objItem.RouteRecord.toArray()).join(",")); } catch(e) { WScript.Echo("RouteRecord: null"); } try { WScript.Echo("RouteRecordResolved: " + (objItem.RouteRecordResolved.toArray()).join(",")); } catch(e) { WScript.Echo("RouteRecordResolved: null"); } WScript.Echo("SourceRoute: " + objItem.SourceRoute); WScript.Echo("SourceRouteType: " + objItem.SourceRouteType); WScript.Echo("StatusCode: " + objItem.StatusCode); WScript.Echo("Timeout: " + objItem.Timeout); try { WScript.Echo("TimeStampRecord: " + (objItem.TimeStampRecord.toArray()).join(",")); } catch(e) { WScript.Echo("TimeStampRecord: null"); } try { WScript.Echo("TimeStampRecordAddress: " + (objItem.TimeStampRecordAddress.toArray()).join(",")); } catch(e) { WScript.Echo("TimeStampRecordAddress: null"); } try { WScript.Echo("TimeStampRecordAddressResolved: " + (objItem.TimeStampRecordAddressResolved.toArray()).join(",")); } catch(e) { WScript.Echo("TimeStampRecordAddressResolved: null"); } WScript.Echo("TimestampRoute: " + objItem.TimestampRoute); WScript.Echo("TimeToLive: " + objItem.TimeToLive); WScript.Echo("TypeofService: " + objItem.TypeofService); } } | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |