Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Query DHCP Lease Duration Information

  • Filter
  • Time
  • Show
Clear All
new posts

  • Query DHCP Lease Duration Information


    We want to query for the lease duration of a subnet scope on DHCP server remotely in our product. We donít have clue from where we can read this information in case DHCP server is present on windows 2003 platform.
    On windows 2000 server we read registry to find all the DHCP subnet information, but that information in not present in registry if DHCP server is on windows 2003 platform.

    Following things which we tried returned only half information.
    1) DhcpGetSubnetInfo API returns only some information like subnet name, comment, and subnet mask. It doesnít give other information like IP range and Lease duration.
    2) We tried using COM (DHCPObjs) object (present in Windows 2000 resource toolkit). But it doesnít give Lease duration.
    Is there any other way to find Lease Duration either through Registry, WMI, dhcp.mdb(DHCP database) or any other source?
    Any help would be appreciated. Thanks in advance.