在 C# 中以编程方式创建 DHCP 预留

发布于 2024-08-07 00:29:39 字数 87 浏览 5 评论 0原文

我被分配的任务是创建一个应用程序,该应用程序接收 MAC 地址并为该 MAC 地址创建 DHCP 保留。 .NET 中是否有内置的 API 可以轻松完成此任务?

I have been assigned the task of creating an application that takes in a MAC address and creates a DHCP reservation for that MAC address. Is there any API built into .NET to easily accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大海や 2024-08-14 00:29:39

当我为基础设施编写应用程序时,Windows 2000 资源工具包中有一个名为 Dhcpobjs.dll 的 COM 库。这可以由 VBScript 使用 IDispatch 动态加载,如下所示:

Set DhcpMgr = CreateObject("Dhcp.Manager")

Set DhcpServer = DhcpMgr.Servers.Connect("192.130.1.5")

我用 google 搜索 [ CreateObject Dhcpobjs.dll ] 看看你得到了什么。您可能能够从 VS 项目添加对此库的引用。

我很惊讶没有用于简单 Windows 基础设施管理的托管库。还可以在 microsoft.com 上的 TechNet 脚本库中查找其他有用的内容。

祝你好运,

卢克

编辑:这可能对工作或分配类似职责的人感兴趣:

Linq to Active Directory:http:// /linqtoad.codeplex.com/

When I was writing apps for infrastructure there was a COM library called Dhcpobjs.dll in the Windows 2000 Resource Kit. This could be dynamically loaded by a VBScript using IDispatch like so:

Set DhcpMgr = CreateObject("Dhcp.Manager")

Set DhcpServer = DhcpMgr.Servers.Connect("192.130.1.5")

I'd google [ CreateObject Dhcpobjs.dll ] and see what you get. You'd likely be able to add a reference to this lib from your VS project.

I'm surprised there's no managed library for simple Windows infra management. Also look in the TechNet script gallery on microsoft.com for other useful stuff.

Good luck,

Luke

EDIT: This may be of interest to people working or assigned similar duties:

Linq to Active Directory: http://linqtoad.codeplex.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文