PowerShell for Windows Admins

May 26 2016   1:15PM GMT

DHCP scope

Richard Siddaway Richard Siddaway Profile: Richard Siddaway


After rebuilding my test machine for Server 2016 (with mixed results) I needed to add a DHCP scope to the environment. I blogged about the DHCP PowerShell module several years ago.

To quickly add a DHCP scope to the current server

Add-DhcpServerv4Scope -Name ‘Manticore Scope’  `
-StartRange -EndRange `
-Description ‘Scope for Manticore domain’ `
-Type DHCP -State Active -SubnetMask `
-LeaseDuration (New-TimeSpan -Days 2)

Set-DhcpServerv4OptionValue  -ScopeId -DnsServer

I’ll save this as I’ll have to rebuild the machine when Windows 2016 RTM’s and possibly again if I can’t get the wireless adapter to work then.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: