Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » vbscript sample

Win32_PerfFormattedData_msftesqlIDXExchange_MSFTESQLExchangeIndexerPlugIn vbscript sample code

The foundations for Manageability in Windows is 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. The Win32_PerfFormattedData_msftesqlIDXExchange_MSFTESQLExchangeIndexerPlugIn WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_msftesqlIDXExchange_MSFTESQLExchangeIndexerPlugIn",,48)
For Each objItem in colItems
    Wscript.Echo "ActiveConnections: " & objItem.ActiveConnections
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "CleanWidSets: " & objItem.CleanWidSets
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "DirtyWidSets: " & objItem.DirtyWidSets
    Wscript.Echo "DocumentsFiltered: " & objItem.DocumentsFiltered
    Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object
    Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime
    Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS
    Wscript.Echo "IndexSize: " & objItem.IndexSize
    Wscript.Echo "L0IndexesWordlists: " & objItem.L0IndexesWordlists
    Wscript.Echo "L0MergeFlushCount: " & objItem.L0MergeFlushCount
    Wscript.Echo "L0MergeFlushSpeedAverage: " & objItem.L0MergeFlushSpeedAverage
    Wscript.Echo "L0MergeFlushSpeedLast: " & objItem.L0MergeFlushSpeedLast
    Wscript.Echo "L0MergesflushesNow: " & objItem.L0MergesflushesNow
    Wscript.Echo "L1MergeCount: " & objItem.L1MergeCount
    Wscript.Echo "L1MergesNow: " & objItem.L1MergesNow
    Wscript.Echo "L1MergeSpeedaverage: " & objItem.L1MergeSpeedaverage
    Wscript.Echo "L1MergeSpeedlast: " & objItem.L1MergeSpeedlast
    Wscript.Echo "L2MergeCount: " & objItem.L2MergeCount
    Wscript.Echo "L2MergesNow: " & objItem.L2MergesNow
    Wscript.Echo "L2MergeSpeedaverage: " & objItem.L2MergeSpeedaverage
    Wscript.Echo "L2MergeSpeedlast: " & objItem.L2MergeSpeedlast
    Wscript.Echo "L3MergeCount: " & objItem.L3MergeCount
    Wscript.Echo "L3MergesNow: " & objItem.L3MergesNow
    Wscript.Echo "L3MergeSpeedaverage: " & objItem.L3MergeSpeedaverage
    Wscript.Echo "L3MergeSpeedlast: " & objItem.L3MergeSpeedlast
    Wscript.Echo "L4MergeCount: " & objItem.L4MergeCount
    Wscript.Echo "L4MergesNow: " & objItem.L4MergesNow
    Wscript.Echo "L4MergeSpeedaverage: " & objItem.L4MergeSpeedaverage
    Wscript.Echo "L4MergeSpeedlast: " & objItem.L4MergeSpeedlast
    Wscript.Echo "L5MergeCount: " & objItem.L5MergeCount
    Wscript.Echo "L5MergesNow: " & objItem.L5MergesNow
    Wscript.Echo "L5MergeSpeedaverage: " & objItem.L5MergeSpeedaverage
    Wscript.Echo "L5MergeSpeedlast: " & objItem.L5MergeSpeedlast
    Wscript.Echo "L6MergeCount: " & objItem.L6MergeCount
    Wscript.Echo "L6MergesNow: " & objItem.L6MergesNow
    Wscript.Echo "L6MergeSpeedaverage: " & objItem.L6MergeSpeedaverage
    Wscript.Echo "L6MergeSpeedlast: " & objItem.L6MergeSpeedlast
    Wscript.Echo "L7MergeCount: " & objItem.L7MergeCount
    Wscript.Echo "L7MergesNow: " & objItem.L7MergesNow
    Wscript.Echo "L7MergeSpeedaverage: " & objItem.L7MergeSpeedaverage
    Wscript.Echo "L7MergeSpeedlast: " & objItem.L7MergeSpeedlast
    Wscript.Echo "L8MergeCount: " & objItem.L8MergeCount
    Wscript.Echo "L8MergesNow: " & objItem.L8MergesNow
    Wscript.Echo "L8MergeSpeedaverage: " & objItem.L8MergeSpeedaverage
    Wscript.Echo "L8MergeSpeedlast: " & objItem.L8MergeSpeedlast
    Wscript.Echo "MasterIndexLevel: " & objItem.MasterIndexLevel
    Wscript.Echo "MasterMergeProgress: " & objItem.MasterMergeProgress
    Wscript.Echo "MasterMergesNow: " & objItem.MasterMergesNow
    Wscript.Echo "MasterMergestoDate: " & objItem.MasterMergestoDate
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PersistentIndexes: " & objItem.PersistentIndexes
    Wscript.Echo "PersistentIndexesL1: " & objItem.PersistentIndexesL1
    Wscript.Echo "PersistentIndexesL2: " & objItem.PersistentIndexesL2
    Wscript.Echo "PersistentIndexesL3: " & objItem.PersistentIndexesL3
    Wscript.Echo "PersistentIndexesL4: " & objItem.PersistentIndexesL4
    Wscript.Echo "PersistentIndexesL5: " & objItem.PersistentIndexesL5
    Wscript.Echo "PersistentIndexesL6: " & objItem.PersistentIndexesL6
    Wscript.Echo "PersistentIndexesL7: " & objItem.PersistentIndexesL7
    Wscript.Echo "PersistentIndexesL8: " & objItem.PersistentIndexesL8
    Wscript.Echo "Queries: " & objItem.Queries
    Wscript.Echo "QueriesFailed: " & objItem.QueriesFailed
    Wscript.Echo "QueriesSucceeded: " & objItem.QueriesSucceeded
    Wscript.Echo "ShadowMergeLevels: " & objItem.ShadowMergeLevels
    Wscript.Echo "ShadowMergeLevelsThreshold: " & objItem.ShadowMergeLevelsThreshold
    Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object
    Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime
    Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS
    Wscript.Echo "UniqueKeys: " & objItem.UniqueKeys
    Wscript.Echo "WorkItemsCreated: " & objItem.WorkItemsCreated
    Wscript.Echo "WorkItemsDeleted: " & objItem.WorkItemsDeleted
Next