List of DHCP servers ?

  • Thread starter Thread starter jmd.msdn
  • Start date Start date
J

jmd.msdn

Hello.

Is it possible to obtain programmatically, with .net 2.0 + C# + Active
Directory or P/Invoke, a list of the authorized current DHCP servers in a
forest/domain ?

And, if the above question can be solved, is it also possible to manage the
DHCP servers (list, add, remove scopes, ...) ?

Thank you.
jean-marie
 
Hi Jean,

Thanks for posting!

For the current issue, as far as I know, we can use the DirectoryServices
namespace which provided by the .Net framework and the AD schema to do this
job.

All DHCP information is included in the DHCP-Class schema (ADSI). We can
use the DirectorySearcher class to search everything in the ADSI. The
article from MSDN document demonstrates how to searching in the AD as below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbtsksearchingactivedirectoryhierarchy.asp

The DHCP-Class schema:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/ad
schema/c_dhcpclass.asp

In addition, the schema includes whole information about the DHCP server.
We can modify any properties by using it.

I hope the above information will be helpful!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
Thank you very much.
I will study the DHCP-Class and begin by read the servers and scopes.

Best regards.
jean-marie
 
Back
Top