Blank DNS Suffix Search Order from WMI

Discussion in 'Server Networking' started by Gene, Apr 4, 2008.

  1. Gene

    Gene Guest

    I am trying to get all the ipconfig info from hundreds of servers to compare
    the settings. The servers are all Windows 2000 or 2003.

    For 99% of the servers, all of the information is returned EXCEPT the DNS
    Suffix Search Order. Only a few servers actually return the it.

    I am using vbscript to query WMI:

    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & sComputer & "\root\cimv2")
    Set colAdapters = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled =

    Then this is empty: objAdapter.DNSDomainSuffixSearchOrder

    So I had the script have a backup plan, if it is empty, then query the

    Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
    sComputer & "\root\default:StdRegProv")
    sKeyPath = "SYSTEM\ControlSet001\Services\Tcpip\Parameters"
    sValueName = "SearchList"
    oReg.GetStringValue HKEY_LOCAL_MACHINE, sKeyPath, sValueName, sValue

    That also comes back empty.

    But if I go to the server and do ipconfig /all, there are definately several
    DNS Suffixes in the search order.

    So where else is that information kept?

    Thanks in advanced for any help.
    Gene, Apr 4, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.