Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: primary domain controller PDC backup domain controller BDC
wntServerType wntServiceInfin the Win32 Network Extender.
Here's where it's located in the registry, so you can use RegQueryValue to retrieve it from HKLM\System\CurrentControlSet\Control\ProductOptions\ProductType, with:
RegQueryValue(@regmachine, "CurrentControlSet\Control\ProductOptions[ProductType]")ProductType will be one of three values:
WINNT = WorkStation LANMANNT = Enterprise Server SERVERNT = ServerA real quick way to determine the PDC is to do a "net time /domain:domainname". This always sets the time from the PDC, giving a message to that extent. You could pipe the output into a file and then parse it for "\\".
I mention this because it is not always the case that the registry security allows lookups, specially if someone has run C2config against the registry.
We use this in our login and it works for both 4.0 and 3.51. Don't do a case sensitive compare as they are not always in caps.
Article ID: W13528
Filename: Determine if a Server is an NT PDC.txt
File Created: 2000:02:08:12:21:44
Last Updated: 2000:02:08:12:21:44