john
Thu May 27 09:44:26 CDT 2004
On Error Resume Next
strComputer = "."
strWinMgmt = "winmgmts:{impersonationLevel=impersonate}!//"& strComputer &""
Set objNICs = GetObject( strWinMgmt ).InstancesOf(
"Win32_NetworkAdapterConfiguration" )
For Each objNIC In objNICs
If objNIC.IPEnabled Then
Wscript.Echo strComputer
Wscript.Echo "WINSPrimaryServer: " & objNIC.WINSPrimaryServer
Wscript.Echo "WINSSecondaryServer: " & objNIC.WINSSecondaryServer
For i = LBound(objNIC.DNSServerSearchOrder) To
UBound(objNIC.DNSServerSearchOrder)
Wscript.Echo "DNS server: " & objNIC.DNSServerSearchOrder(i)
Next
End If
Next
Regards,
J
"Roland Hall" <nobody@nowhere> wrote in message
news:%23nxeJ%237QEHA.556@TK2MSFTNGP10.phx.gbl...
> "Scott Anderson" wrote in message
> news:17ABBE18-017E-44E4-866C-C32E82FCD3B0@microsoft.com...
> : I am trying to enumerate the DNS IP Addresses on a local computer, but
am
> having trouble in do so. I can set new DNS primary or secondary DNS
> address, but can't get the current setting. Can anyone help with this?
>
> Everything re: the client network settings:
>
>
http://www.microsoft.com/technet/community/scriptcenter/network/scrnet12.mspx
>
> HTH...
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library -
http://msdn.microsoft.com/library/default.asp
>
>