PowerShell for Windows Admins

Jan 7 2015   2:27PM GMT

DHCP scope lease time

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Windows Server 2012
Windows Server 2012 R2

I wanted to reduce the lease time on a DHCP scope

$lt = New-TimeSpan -Hours 12
Set-DhcpServerv4Scope -ScopeId -LeaseDuration $lt

You could even make it a one liner if you wished

Set-DhcpServerv4Scope -ScopeId –LeaseDuration (New-TimeSpan -Hours 12)

2  Comments 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.
  • cfizz3434
    Is it possible to do it for all the scopes on a particular DHCP server all in a one line command?
    10 pointsBadges:
  • Richard Siddaway
    You can do it in one PowerShell pipeline - I'll post an example
    9,825 pointsBadges:

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: