Networknet archive Blog

Windows Server 2003: Install the DHCP service with a script

Originally published Last updated

By Ivan Versluis

I want more control over DHCP clients and options in my lab than VMware Workstation’s VMNet8 NAT network provides. I also like scripting administration tasks so I can reuse the code. The following files install the DHCP service on Windows Server 2003.

Install the DHCP service

Create a new file named c:\dhcp_server.txt with the following contents:

[NetOptionalComponents]

DHCPServer =1

Save the file, open a CMD command shell and run:

Code1 line
1
sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\dhcp_server.txt

image 

See the Windows Server component reference for additional components.