Force DHCP via group Policy

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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,
 
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
 
Back
Top