PowerShell for Windows Admins

May 26 2016   1:15PM GMT

DHCP scope

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tags:
DHCP

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 10.10.54.2 -EndRange 10.10.54.30 `
-Description ‘Scope for Manticore domain’ `
-Type DHCP -State Active -SubnetMask 255.255.255.0 `
-LeaseDuration (New-TimeSpan -Days 2)

Set-DhcpServerv4OptionValue  -ScopeId 10.10.54.0 -DnsServer 10.10.54.201

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: