Contact Info

Crumbtrail

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

Win32_PerfFormattedData_msftesqlExchange_MSFTESQLExchangeCatalogs 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_msftesqlExchange_MSFTESQLExchangeCatalogs 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_msftesqlExchange_MSFTESQLExchangeCatalogs",,48)
For Each objItem in colItems
    Wscript.Echo "Batchesaborted: " & objItem.Batchesaborted
    Wscript.Echo "Batchescompletedsuccess: " & objItem.Batchescompletedsuccess
    Wscript.Echo "BatchescompletedwPererrors: " & objItem.BatchescompletedwPererrors
    Wscript.Echo "BatchescompletedwPerwarnings: " & objItem.BatchescompletedwPerwarnings
    Wscript.Echo "Batchesdone: " & objItem.Batchesdone
    Wscript.Echo "BatchesFPC: " & objItem.BatchesFPC
    Wscript.Echo "Batchesinprogress: " & objItem.Batchesinprogress
    Wscript.Echo "Batchesreceived: " & objItem.Batchesreceived
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object
    Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime
    Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Phasecomplete: " & objItem.Phasecomplete
    Wscript.Echo "PhaseinHDFD: " & objItem.PhaseinHDFD
    Wscript.Echo "PhaseinMTFD: " & objItem.PhaseinMTFD
    Wscript.Echo "Phaseinpipeline: " & objItem.Phaseinpipeline
    Wscript.Echo "Phaseinreadyqueue: " & objItem.Phaseinreadyqueue
    Wscript.Echo "PhaseinSTFD: " & objItem.PhaseinSTFD
    Wscript.Echo "Phaseonhold: " & objItem.Phaseonhold
    Wscript.Echo "Phasependingcompletion: " & objItem.Phasependingcompletion
    Wscript.Echo "Phaseredundant: " & objItem.Phaseredundant
    Wscript.Echo "Requestabort: " & objItem.Requestabort
    Wscript.Echo "Requestasyncflush: " & objItem.Requestasyncflush
    Wscript.Echo "RequestflushPerdrain: " & objItem.RequestflushPerdrain
    Wscript.Echo "Requestforcemerge: " & objItem.Requestforcemerge
    Wscript.Echo "Requestpause: " & objItem.Requestpause
    Wscript.Echo "Requestreset: " & objItem.Requestreset
    Wscript.Echo "Requestresume: " & objItem.Requestresume
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "StateCallerComponent: " & objItem.StateCallerComponent
    Wscript.Echo "StateReasoncode: " & objItem.StateReasoncode
    Wscript.Echo "StateResultCode: " & objItem.StateResultCode
    Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object
    Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime
    Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS
    Wscript.Echo "Transdeletes: " & objItem.Transdeletes
    Wscript.Echo "Transdone: " & objItem.Transdone
    Wscript.Echo "Transerrored: " & objItem.Transerrored
    Wscript.Echo "Transinprogress: " & objItem.Transinprogress
    Wscript.Echo "Transmodifies: " & objItem.Transmodifies
    Wscript.Echo "Transrerouted: " & objItem.Transrerouted
Next