2

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?

Community
  • 1
  • 1
Dreaddan
  • 687
  • 1
  • 7
  • 14
  • Would it be ok to query ADSI/LDAP instead? If so I can supply code. If WMI is required, then try looking for the service "Active Directory Domain Services" (aka "NTDS"). If it's installed and running then it's a DCT. – Lizz Sep 04 '12 at 21:05
  • Thanks, we decided to go another route as the tool wasnt working correctly. – Dreaddan Sep 06 '12 at 04:14

1 Answers1

0

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.

Dreaddan
  • 687
  • 1
  • 7
  • 14