List of DHCP servers ?

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
 
Y

Yuan Ren[MSFT]

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
 
J

jmd.msdn

Thank you very much.
I will study the DHCP-Class and begin by read the servers and scopes.

Best regards.
jean-marie
 
Y

Yuan Ren[MSFT]

Hi Jean-marie,

You are welcome:)

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 

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