Networking Forums

Networking Forums > Computer Networking > Windows Networking > script DHCP Leas Duration

Reply
Thread Tools Display Modes

script DHCP Leas Duration

 
 
=?Utf-8?B?d2lsbGllX2xvZ29u?=
Guest
Posts: n/a

 
      01-12-2005, 01:05 PM
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

 
Reply With Quote
 
 
 
 
Charles Denny [MSFT]
Guest
Posts: n/a

 
      01-20-2005, 06:36 PM
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
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add DHCP Reservations with a script Ben Windows Networking 2 06-12-2008 02:01 PM
Configuring DHCP with a NETSH Script Gis Bun Windows Networking 0 04-30-2008 05:28 PM
Query DHCP Lease Duration Information somu Windows Networking 1 03-25-2008 05:59 PM
DHCP lease duration time Jim in Cleveland Windows Networking 1 02-13-2006 08:27 PM
DHCP Script stevens Windows Networking 1 05-31-2005 04:25 PM



1 2 3 4 5 6 7 8 9 10 11