Contact Info

Crumbtrail » Administration » Scripts » WMI Performance Counters » VBScript

NetTCPSetting - WMI sample in VBScript

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The NetTCPSetting WMI class can be used in ActiveXperts Network Monitor to monitor your servers.



Set objWMIService = GetObject("winmgmts:\\.\root\StandardCimv2")

Set colItems = objWMIService.ExecQuery("Select * From MSFT_NetTCPSetting")

For Each objItem in colItems
	WScript.Echo "AutoTuningLevelEffective:" & objItem.AutoTuningLevelEffective
	WScript.Echo "AutoTuningLevelGroupPolicy:" & objItem.AutoTuningLevelGroupPolicy
	WScript.Echo "AutoTuningLevelLocal:" & objItem.AutoTuningLevelLocal
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "CommonName:" & objItem.CommonName
	WScript.Echo "CongestionProvider:" & objItem.CongestionProvider
	WScript.Echo "CreationClassName:" & objItem.CreationClassName
	WScript.Echo "CwndRestart:" & objItem.CwndRestart
	WScript.Echo "DelayedAckTimeout:" & objItem.DelayedAckTimeout
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "DoActionLogging:" & objItem.DoActionLogging
	WScript.Echo "DynamicPortRangeNumberOfPorts:" & objItem.DynamicPortRangeNumberOfPorts
	WScript.Echo "DynamicPortRangeStartPort:" & objItem.DynamicPortRangeStartPort
	WScript.Echo "EcnCapability:" & objItem.EcnCapability
	WScript.Echo "ElementName:" & objItem.ElementName
	WScript.Echo "InitialCongestionWindow:" & objItem.InitialCongestionWindow
	WScript.Echo "InitialRto:" & objItem.InitialRto
	WScript.Echo "InstanceID:" & objItem.InstanceID
	WScript.Echo "MemoryPressureProtection:" & objItem.MemoryPressureProtection
	WScript.Echo "MinRto:" & objItem.MinRto
	WScript.Echo "PolicyActionName:" & objItem.PolicyActionName
	WScript.Echo "PolicyKeywords:" & Join(objItem.PolicyKeywords)
	WScript.Echo "PolicyRuleCreationClassName:" & objItem.PolicyRuleCreationClassName
	WScript.Echo "PolicyRuleName:" & objItem.PolicyRuleName
	WScript.Echo "ScalingHeuristics:" & objItem.ScalingHeuristics
	WScript.Echo "SettingName:" & objItem.SettingName
	WScript.Echo "SystemCreationClassName:" & objItem.SystemCreationClassName
	WScript.Echo "SystemName:" & objItem.SystemName
	WScript.Echo "Timestamps:" & objItem.Timestamps
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""