# Possible to deploy DHCP via Group Policy?



## kbcs6dpm (Apr 30, 2007)

Hello, i was wondering if any of you could advise?

I'm wanting to convert our Windows 2000 & XP workstations from static IP addresses to DHCP. We have a DHCP server (Windows 2003) up and ready.

Is it possible to deploy DHCP to our workstations using Active Directory Group Policy, rather than going round each machine manually?

Any advice would be grateful. Thanks.


----------



## TheMatt (May 9, 2006)

Hi, and welcome to TSF! :wave:

I am pretty sure that this is possible, but I don't know exactly where it is. I will check for you.


----------



## newhouse1390 (Jan 10, 2005)

The machines need to be set uo to allow DHCP to configure the IP addresss scheme. There can only be one DHCP server running on a subnet otherwise computers will renew the IP address from the DHCP server that last issued a valid address.

You only need to authorize the server in Active Directory, which is a simple as a right click from within the DHCP console.

Is the DHCP server already on the domain, and authorized?

I think what you are asking is it possible to take the machines that have already been configured and have them configured via Group Policy to automatically obtain IP/DNS?

This cannot be done from a GPO. The IP stack starts before GPO processing runs. You will have to configure this machine to machine.

Keep in mind that computers have to point to DNS in order to authenticate on the domain. Makie sure DHCP is configured properly.


----------



## kbcs6dpm (Apr 30, 2007)

Thanks for your answers. After some research, i found out that it's not possible with Active Directory group policy. 

But you can use a start up script in group policy that will change the settings over to DCHP when the client machine boots up.

The script to use is located here:
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/default.mspx?mfr=true

To learn more about scripting, start here:
http://www.microsoft.com/technet/scriptcenter/topics/beginner/firststeps.mspx


----------



## TheMatt (May 9, 2006)

Take a look at this article:
http://support.microsoft.com/?kbid=257748

You can use the netsh command to do this. The easiest way is to create a batch file and run it on the server. The only catch is that the users you are applying this to must be administrators, power users, or users with privileges to change network settings.

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


----------



## newhouse1390 (Jan 10, 2005)

If you run the script as a "Startup Script" rather than a "Login Script" you will be able to implement this change no matter what the users rights are, since the script will be running as SYSTEM, as opposed to an unprivileged user.


----------

