473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 3278
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.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.