Blank DNS Suffix Search Order from WMI
- From: Gene <Gene@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Apr 2008 06:50:02 -0700
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 =
True")
Then this is empty: objAdapter.DNSDomainSuffixSearchOrder
So I had the script have a backup plan, if it is empty, then query the
registry:
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.
.
- Prev by Date: RDP Shadow Mode: How to pass CTRL+ALT+DEL to remote?
- Next by Date: Re: Joint 2003 Server to Domain over Checkpoint VPN
- Previous by thread: RDP Shadow Mode: How to pass CTRL+ALT+DEL to remote?
- Next by thread: SNMP Binding
- Index(es):
Relevant Pages
|