somesh Posted March 25, 2008 Share Posted March 25, 2008 Hi,We want to query for the lease duration of a subnet scope on DHCP server remotely in our product. 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.-----------------------------------------------------Thanks & Regards~ Somesh Link to comment Share on other sites More sharing options...
somesh Posted March 25, 2008 Author Share Posted March 25, 2008 I forgot to mention that we are not getting any source for reading Lease duration information in case DHCP server is on Windows 2003 and later OS. On windows 2000 server we read registry to find all the DHCP subnet information, but as per research till now, this information is not present in registry in case DHCP server is on windows 2003 platform.Thanks in advanceSomesh Link to comment Share on other sites More sharing options...
IcemanND Posted March 25, 2008 Share Posted March 25, 2008 you can get the lease obtain date and time and expiration on a client using WMI and Win32_NetworkAdapterConfiguration Link to comment Share on other sites More sharing options...
somesh Posted March 26, 2008 Author Share Posted March 26, 2008 (edited) Thanks for reply; but we are interested getting Lease Duration that is configured for a subnet scope;We can get the Lease Expiry information for subnet clients using WIN32 API (DhcpEnumSubnetClients) also; Any idea how we can read lease duration for subnet scope when DHCP server is on Windows 2003 OS?Thanks~Somesh Edited March 26, 2008 by somesh Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted March 28, 2008 Share Posted March 28, 2008 I'm pretty sure that on Windows 2003 getting this information, even using the DHCP MMC snapin, requires that you be in at least one of the following domain groups:Domain AdminsEnterprise AdminsDHCP AdministratorsI do know that if you're not in at least one of those groups, you can't even connect to a DHCP Server with the DHCP MMC Snapin. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now