How to get a count of ManagementObjects (WMI results) without enumerating through the collection in
- by Mark
When querying for large ammount of data through WMI (say the windows events log Win32_NTLogEvent) it is very useful to know what kind of numbers you are getting yourself into before downloading all the content. Is there a way two do this?
From what i know there is no "Select Count(*) FROM Win32_NTLogEvent" in WQL.
From what i know the Count property of the ManagementObjectCollection actually enumerates through all the results whether you have the Rewindable property set to true or false.
If it cannot be done in .NET, can it be done by directly using the underlying IWbem objects
Thanks