Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: DHCP

HTVi
TV Discussion Newsgroups

DHCP
Ricard Escamilla 5/4/2007 11:33:00 AM
I have this script:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

For Each objNetAdapter In colNetAdapters
errEnable = objNetAdapter.EnableDHCP()
Next

That enables DHCP for my computers to take Adress, Mask and Gateway. I want
that my computers take the DNS servers by DHCP too but i don't know how to do
it.
Can someone help me?
Re: DHCP
"CreateWindow" <createwindow[ at ]gmail.com> 5/4/2007 12:32:47 PM
Hi,

Your DHCP server should supply the DNS IP's. The script is OK.

Check the DNS Settings for your DHCP service?

Hope that helps,
CreateWindow
http://justpageprobe.com
The FREE Web page utility you always wanted.
Keep your router connected.
Email your IP to where you need it.
Monitor your enterprise Web Servers.


"Ricard Escamilla" <RicardEscamilla[ at ]discussions.microsoft.com> wrote in
message news:26C1348E-A0EB-4582-AA2C-35B3BDABF4A4[ at ]microsoft.com...
[Quoted Text]
>I have this script:
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
>
> Set colNetAdapters = objWMIService.ExecQuery _
> ("Select * from Win32_NetworkAdapterConfiguration where
> IPEnabled=TRUE")
>
> For Each objNetAdapter In colNetAdapters
> errEnable = objNetAdapter.EnableDHCP()
> Next
>
> That enables DHCP for my computers to take Adress, Mask and Gateway. I
> want
> that my computers take the DNS servers by DHCP too but i don't know how to
> do
> it.
> Can someone help me?


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen