472,370 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,370 software developers and data experts.

List of DHCP servers ?

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
Jan 21 '06 #1
3 3218
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/de...us/vbcon/html/
vbtsksearchingactivedirectoryhierarchy.asp

The DHCP-Class schema:
http://msdn.microsoft.com/library/de...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

Jan 23 '06 #2
Thank you very much.
I will study the DHCP-Class and begin by read the servers and scopes.

Best regards.
jean-marie

""Yuan Ren[MSFT]"" <v-****@microsoft.com> wrote in message
news:zZ**************@TK2MSFTNGXA02.phx.gbl...
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/de...us/vbcon/html/
vbtsksearchingactivedirectoryhierarchy.asp

The DHCP-Class schema:
http://msdn.microsoft.com/library/de...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

Jan 23 '06 #3
Hi Jean-marie,

You are welcome:)

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

Jan 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Richard D. Ford | last post by:
Does anyone know if VB has an exposed API that can be used to query DHCP for current address leases? I have seen threads that discuss DHCPObj.dll and have successfully used it. However, this only...
5
by: Steve | last post by:
Hi Folks, I'm trying to create a c# class to manage a DHCP subnet using the win api (dhcpsapi.dll). Currently I can't even instanciate my class, instead I receive the error:...
5
by: Richard | last post by:
Hello, I'm working on an application to allow our network team to use a small application to make DHCP reservations on our Microsoft DHCP Server. The problem is you have to use P/Invoke to do...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
7
by: ixeye | last post by:
Anybody else ever had a problem like this? Windows 2003 Domain with 180 machines, 21 of them with XP SP2 Laptop Wireless access to the domain, on three different WIFI AP. Randomly (and luckily...
0
cyberking
by: cyberking | last post by:
Hi all, Firstly, I am very little knowledgible when it comes to Windows OS (Client OS or Server OS). But offlate my urge to get myself in terms with it increased and soon I was meddling with the...
7
by: =?Utf-8?B?VGhlTWFkSGF0dGVy?= | last post by:
Quick q: If I open a socket on my computer and eventualy the dhcp changes the address of my computer, what happens? Will it drop the connection? Thanks in advance for any help on the topic.
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.