Tag Archives: netsh

Scripting DHCP server deployments using netsh in Windows Server 2008 R2

Windows_Server_2008_R2_Logo

Another quick post to show how you can quickly deploy fully working DHCP server with multiple scopes in a matter of seconds. In my case it was a single server with 90 very different scopes and doing this manually would be just soo boring and long that’s unreal. Unfortunately Windows Server 2012 wasn’t an option so no PowerShell love but Windows Server 2008 R2 is still pretty decent and using netsh wasn’t as painful as it seemed. To get us started we need to install the DHCP Server role and start the required service (dhcpserver):

Next step is to authorize DHCP server in the enterprise so we can actually use it to dish out IP addresses:

Other useful commands here would include:

To deauthorize the server –

and to list all authorized servers –

Continue reading