PDA

View Full Version : Script to enable DHCP (W2K)



maciejsobolewski
03-29-2004, 12:11 PM
All,

I am in desperate need of a script that will change all netwok adapters in a workstation from staticially assigned to DHCP. I need to migrate a entire site (300+machines) to dhcp, and I can't find any place that shows me how. I am planning on putting this into the PC startup script.

Any help appreciated

Mac

monkey_1
03-29-2004, 02:39 PM
You could use <a target="_blank" href=http://support.microsoft.com/default.aspx?scid=kb;en-us;257748&Product=win2000>NETSH</a>...


<font color=orange>Mono</font color=orange>

maciejsobolewski
03-31-2004, 05:42 AM
I've tried netsh in a .CMD file at startup and got mixed results from the 10 test workstations. If I remember correctly if they we're already set to DHCP it failed to get a IP address. These are all W2K/XP machines, latest SP's.

This is the .cmd as I added it to the computer startup script:

***
netsh interface ip set address "Local Area Connection" dhcp
ipconfig /release
ipconfig /renew
***

Do you think I should try it on a user login script instead?

Thanks

Mac