Script DHCP Lease period

G

Guest

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
 
R

Richard G. Harper

The lease period is controlled by the DHCP server, and that's where you
should be setting it.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm
 
G

Guest

Thanks Richard, I am aware of that but how do I set it using a script. I have
170 servers in remote offices and I need to change the lease period on all of
the by script

Richard G. Harper said:
The lease period is controlled by the DHCP server, and that's where you
should be setting it.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


willie_logon said:
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
 
P

Phillip Windell

What about GPO's? Is there anyway a GPO can configure a DHCP Server? Are
these Server domain members?

--

Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com

willie_logon said:
Thanks Richard, I am aware of that but how do I set it using a script. I have
170 servers in remote offices and I need to change the lease period on all of
the by script

Richard G. Harper said:
The lease period is controlled by the DHCP server, and that's where you
should be setting it.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


willie_logon said:
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
 
D

Doug Sherman [MVP]

J

James McIllece [MS]

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

The lease time is actually an option (it is just wrapped by the Scope
Properties in the snap-in).

You can change the lease time by changing the value of option 51. It is a
DWORD representing the length of the lease time in seconds.

--
James McIllece, Microsoft

Please do not send email directly to this alias. This is my online account
name for newsgroup participation only.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Richard G. Harper

If you make the change on your DHCP Server, then all the "script" you'll
need for the servers will be:

ipconfig /release
ipconfig /renew

This will query the DHCP server for an address and any optional settings you
have defined within the address range. If your current lease period is
short you won't need any script at all, since within half the time of the
current lease renewal all the servers should be updated.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


willie_logon said:
Thanks Richard, I am aware of that but how do I set it using a script. I
have
170 servers in remote offices and I need to change the lease period on all
of
the by script

Richard G. Harper said:
The lease period is controlled by the DHCP server, and that's where you
should be setting it.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


willie_logon said:
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
 
G

Guest

Spot on thank you very much

to change to a 15 minute lease time I used
set optionvalue dword 900
in the scope context
 
J

James McIllece [MS]

You're welcome, and thanks to Doug Sherman, too, who actually posted this
info before I did, I just didn't notice his post. :)


Thanks Very much This is exactly what I was looking for



--
James McIllece, Microsoft

Please do not send email directly to this alias. This is my online account
name for newsgroup participation only.

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top