On Windows Server 2008 (R2, 32-Bit, I found the following way to set the lease duration for, say, 3600 Seconds (1 Hour).
netsh dhcp server scope 10.0.0.0 set optionvalue 51 DWORD 3600
[→ source]
This is based upon RFC 2132 where optionvalue 51
stands for "IP Address Lease Time". It is possible to set the lease duration to unlimited through the GUI, but I didn't find a way to do this through the command line.
Question: How to set unlimited Lease time through cmd?
In an article applying to Windows Server 2003 (R2, SP1, SP2) I found the following:
… run from the
netsh dhcp server mscope>
promptset lease TIME
… Specifies the lease duration for clients of the multicast [?!] scope. Specifying -1 sets the duration of the IP address lease to an unlimited or infinite time. [→ source]
Which doesn't help me much.