You can use netsh to configure the lease time for each scope.
dhcp server scope <scope subnet> set optionvalue 51 DWORD <Lease Time in
Seconds>
If you get an error around the invalid option value, you can run the
following prior to running the above command:
dhcp server <server IP> Add Optiondef 51 "Lease" DWORD 0 comment="Client
IP address lease time in seconds" 0
The easiest way to figure this stuff out is to configure one scope manually
on a DHCP server and then run the following command on the DHCP server to
get a complete dump of the configuration of the DHCP server:
netsh dhcp server 127.0.0.1 dump > DHCP.cfg
Regards,
Charles
--
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only."
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"willie_logon" <(E-Mail Removed)> wrote in message
news:410C1198-0CAD-4E91-9023-(E-Mail Removed)...
>I need a script to change the lease period for a DHCP scope on a windows
>2003
> server.
>
> I have scripts to install DHCP and configure the scope and Options using
> NETSH but there does not seem to be an option for changing the lease
> period
>