none
What command can I run to change all the lease times on all the scopes?

    Question

  • I have this so far...one at a time

    PS C:\Windows\system32>Set-DhcpServerv4Scope –ComputerName dhcpserver01 -ScopeID 10.1.1.1 -LeaseDuration (New-TimeSpan -Hours 4)

    I just dont want to enter all 150 scopes so any help would be appreciated.

    Wednesday, April 19, 2017 9:11 PM

Answers

All replies

  • Get-DhcpServerv4Scope  –ComputerName dhcpserver01  | Set-DhcpServerv4Scope -LeaseDuration (New-TimeSpan -Hours 4)

    \_(ツ)_/


    Wednesday, April 19, 2017 9:27 PM
    Moderator
  • thank you , thank you!!!  i only had to alter it just a tad but you saved me a TON of time!!!

    Get-DhcpServerv4Scope –ComputerName dhcpserver01  | Set-DhcpServerv4Scope -ComputerName dhcpserver01 -LeaseDuration (New-TimeSpan -Hours 4)

    Thursday, April 20, 2017 1:09 PM
  • i now this is probably not the right spot for this question but do you know how to do the same thing for an old Win2003 DHCP server as the powershell commands don't work with it?  thanks again for all the help!!!
    Thursday, April 20, 2017 1:11 PM
  • WS2003 is no longer supported.  There are no DHCP commands for a WS2003 DHCP server.  YOU might be able to makes some changes using netsh.


    \_(ツ)_/

    Thursday, April 20, 2017 6:22 PM
    Moderator