Search code examples
wmiwqloval

Changing WMI/WQL results output


Now this is a odd one but as I don't know WMI/WQL I hope someone can help and spot a simple mistake..

I need to find out if a system is a domain controller or not - simple with WMI select DomainRole from Win32_ComputerSystem gets the data.

However the tool I'm using to run and test the output seems not to understand it needs to look at the values under the object(s) so is it possible to get the result within the object key/name/1st level result?

To provide a example:

If I run that query I get the computer name back.

If I run select Name from Win32_NetworkProtocol I get all the protocol details back.

eg

MSAFD Tcpip [TCP/IP]

RSVP TCP Service Provider

So am I wrong or the tool?


Solution

  • To answer my own question. It doesn't look like we can change how/what is returned. My issue was caused by the tool were using returning the wrong data.