Win32_PerfFormattedData_WSearchIdxPi powershell 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_WSearchIdxPi WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
$strComputer = "." $objWMi = get-wmiobject -computername localhost -Namespace root\CIMV2 -Query "Select * from Win32_PerfFormattedData_WSearchIdxPi_SearchIndexer" foreach ($obj in $objWmi) { write-host "ActiveConnections:" $obj.ActiveConnections write-host "Caption:" $obj.Caption write-host "CleanWidSets:" $obj.CleanWidSets write-host "Description:" $obj.Description write-host "DirtyWidSets:" $obj.DirtyWidSets write-host "DocumentsFiltered:" $obj.DocumentsFiltered write-host "Frequency_Object:" $obj.Frequency_Object write-host "Frequency_PerfTime:" $obj.Frequency_PerfTime write-host "Frequency_Sys100NS:" $obj.Frequency_Sys100NS write-host "IndexSize:" $obj.IndexSize write-host "L0IndexesWordlists:" $obj.L0IndexesWordlists write-host "L0MergeFlushCount:" $obj.L0MergeFlushCount write-host "L0MergeFlushSpeedAverage:" $obj.L0MergeFlushSpeedAverage write-host "L0MergeFlushSpeedLast:" $obj.L0MergeFlushSpeedLast write-host "L0MergesflushesNow:" $obj.L0MergesflushesNow write-host "L1MergeCount:" $obj.L1MergeCount write-host "L1MergesNow:" $obj.L1MergesNow write-host "L1MergeSpeedaverage:" $obj.L1MergeSpeedaverage write-host "L1MergeSpeedlast:" $obj.L1MergeSpeedlast write-host "L2MergeCount:" $obj.L2MergeCount write-host "L2MergesNow:" $obj.L2MergesNow write-host "L2MergeSpeedaverage:" $obj.L2MergeSpeedaverage write-host "L2MergeSpeedlast:" $obj.L2MergeSpeedlast write-host "L3MergeCount:" $obj.L3MergeCount write-host "L3MergesNow:" $obj.L3MergesNow write-host "L3MergeSpeedaverage:" $obj.L3MergeSpeedaverage write-host "L3MergeSpeedlast:" $obj.L3MergeSpeedlast write-host "L4MergeCount:" $obj.L4MergeCount write-host "L4MergesNow:" $obj.L4MergesNow write-host "L4MergeSpeedaverage:" $obj.L4MergeSpeedaverage write-host "L4MergeSpeedlast:" $obj.L4MergeSpeedlast write-host "L5MergeCount:" $obj.L5MergeCount write-host "L5MergesNow:" $obj.L5MergesNow write-host "L5MergeSpeedaverage:" $obj.L5MergeSpeedaverage write-host "L5MergeSpeedlast:" $obj.L5MergeSpeedlast write-host "L6MergeCount:" $obj.L6MergeCount write-host "L6MergesNow:" $obj.L6MergesNow write-host "L6MergeSpeedaverage:" $obj.L6MergeSpeedaverage write-host "L6MergeSpeedlast:" $obj.L6MergeSpeedlast write-host "L7MergeCount:" $obj.L7MergeCount write-host "L7MergesNow:" $obj.L7MergesNow write-host "L7MergeSpeedaverage:" $obj.L7MergeSpeedaverage write-host "L7MergeSpeedlast:" $obj.L7MergeSpeedlast write-host "L8MergeCount:" $obj.L8MergeCount write-host "L8MergesNow:" $obj.L8MergesNow write-host "L8MergeSpeedaverage:" $obj.L8MergeSpeedaverage write-host "L8MergeSpeedlast:" $obj.L8MergeSpeedlast write-host "MasterIndexLevel:" $obj.MasterIndexLevel write-host "MasterMergeProgress:" $obj.MasterMergeProgress write-host "MasterMergesNow:" $obj.MasterMergesNow write-host "MasterMergestoDate:" $obj.MasterMergestoDate write-host "Name:" $obj.Name write-host "PersistentIndexes:" $obj.PersistentIndexes write-host "PersistentIndexesL1:" $obj.PersistentIndexesL1 write-host "PersistentIndexesL2:" $obj.PersistentIndexesL2 write-host "PersistentIndexesL3:" $obj.PersistentIndexesL3 write-host "PersistentIndexesL4:" $obj.PersistentIndexesL4 write-host "PersistentIndexesL5:" $obj.PersistentIndexesL5 write-host "PersistentIndexesL6:" $obj.PersistentIndexesL6 write-host "PersistentIndexesL7:" $obj.PersistentIndexesL7 write-host "PersistentIndexesL8:" $obj.PersistentIndexesL8 write-host "Queries:" $obj.Queries write-host "QueriesFailed:" $obj.QueriesFailed write-host "QueriesSucceeded:" $obj.QueriesSucceeded write-host "ShadowMergeLevels:" $obj.ShadowMergeLevels write-host "ShadowMergeLevelsThreshold:" $obj.ShadowMergeLevelsThreshold write-host "Timestamp_Object:" $obj.Timestamp_Object write-host "Timestamp_PerfTime:" $obj.Timestamp_PerfTime write-host "Timestamp_Sys100NS:" $obj.Timestamp_Sys100NS write-host "UniqueKeys:" $obj.UniqueKeys write-host "WorkItemsCreated:" $obj.WorkItemsCreated write-host "WorkItemsDeleted:" $obj.WorkItemsDeleted write-host write-host "########" write-host }