Loading |
VBScript |
JavaScript |
Powershell |
Search Options: WMI MSIPNAT_ConnectionCreationEvent QueryContent of WMI MSIPNAT_ConnectionCreationEvent Query.jsMD5 Hash: 4690EF890B725114EEB03AF98EF225CC |
||
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\\WMI"); var colItems = objWMIService.ExecQuery("SELECT * FROM MSIPNAT_ConnectionCreationEvent", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("Active: " + objItem.Active); WScript.Echo("InboundConnection: " + objItem.InboundConnection); WScript.Echo("InstanceName: " + objItem.InstanceName); WScript.Echo("LocalAddress: " + objItem.LocalAddress); WScript.Echo("LocalPort: " + objItem.LocalPort); WScript.Echo("Protocol: " + objItem.Protocol); WScript.Echo("RemoteAddress: " + objItem.RemoteAddress); WScript.Echo("RemotePort: " + objItem.RemotePort); try { WScript.Echo("SECURITY_DESCRIPTOR: " + (objItem.SECURITY_DESCRIPTOR.toArray()).join(",")); } catch(e) { WScript.Echo("SECURITY_DESCRIPTOR: null"); } WScript.Echo("TIME_CREATED: " + objItem.TIME_CREATED); } } | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |