如何使用 WMI 删除 DNS 区域
我可以创建一个新区域,添加和删除该区域的记录,所有这些都可以使用 WMI 和 System.Management 相对轻松地完成,但我一生都不知道如何删除区域。它似乎不是 WMI 文档中的方法:
http://msdn.microsoft.com/en-us/library/ms682123(VS.85).aspx
关于如何执行此操作有什么想法吗?当我们删除旧网站客户时,试图保持 DNS 服务器干净,但我只能删除一个区域中的所有记录。
编辑:这是在 Windows Server 2008 R2 机器上。如果有一个可以从远程计算机执行的替代解决方案和 C# 代码,我可以接受“不使用 WMI”的答案
I can create a new zone, add and delete records for that zone, all relatively easily using WMI and System.Management, but for the life of me can't figure out how to delete a zone. It doesn't appear to be a method in the WMI Documentation:
http://msdn.microsoft.com/en-us/library/ms682123(VS.85).aspx
Any thoughts on how to do this? Trying to keep the DNS server clean when we remove old website customers, but I can only get as good as deleting all the records in a zone.
EDIT: This is on a windows server 2008 R2 machine. And I would be ok with an answer of "don't use WMI" if there is an alternate solution I can execute from a remote machine and code in c#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以按照与删除记录相同的方式删除区域。
You can delete zones in the same manner you would a record.