Force DHCP via group Policy

G

Guest

Hello,
i need to force DHCP in place of static ip and dns address. Is possible via
group policy and a script without need to configure each pc manually?
Thank you in advance.
Michael from Italy
 
G

Guest

Hi Michele,

Yes, you can change network settings on clients PCs without need to
configure each pc manually.
I made a simple test running on VirtualPC and using the Netsh command.
In that test i have created a new policy and a startup script, NetCfg.cmd
with the following commands:

netsh interface ip set address name="Local Area Connection" source=dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp

I have linked the new policy to the OU where Computer objects reside and
then I have restarted my clients PCs.
After the clients restart you can see Network configuration changed to DHCP.

Don't forget every time you restart clients Pcs, startup script will run.

If you have SMS or other tools to deploy Software you should use it to do
that instead of GPO.

You can read more about Netsh commands for Interface IP at
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh_int_ip.mspx

Regards,
 
J

Jorge_de_Almeida_Pinto

Hello,
i need to force DHCP in place of static ip and dns address. Is
possible via
group policy and a script without need to configure each pc
manually?
Thank you in advance.
Michael from Italy

Never tried it myself but try it using the foloowing scripts

ENABLE DHCP
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/nwmovb05.mspx

RENEW DHCP LEASE
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/nwmovb38.mspx
or
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/nwmovb39.mspx
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top