How can we implement the query as stated below via a connector WMI implementation?
Note that the MSFT_NetTCPConnection is under the root\StandardCimv2 namespace.
select InstanceID,LocalAddress,LocalPort,RemoteAddress,RemotePort,State from MSFT_NetTCPConnection
The stream-viewer indicates a 'Query failed : Retrieving the data failed. (hr = 0x80041010)'.
This most likely indicates a 'Invalid Class' error, which we're assuming is due to a different namespace.
We do get the queries to work under the root\Cimv2 namespace with a similar implementation.
Is it even possible to perform WMI queries for namespaces other than root\Cimv2?
Hi Brecht,
I had a quick search and I cannot seem to find a way of specifying the namespace in your WMI query in a connector.
It appears that SLProtocol automatically ensures the root\Cimv2 namespace.
Maybe others know of a way but if it is indeed not possible you could consider, as a workaround, the ManagementObjectSearcher class in C# and more specifically into the following method and example ManagementObjectSearcher.Get Method (System.Management) | Microsoft Learn