支持平台
Windows Server 2003 |
是 |
Windows XP |
否(然而,可以在 Windows XP 计算机上对远程 DNS 服务器运行脚本) |
Windows 2000 |
是,需要安装 DNS WMI 提供程序 |
Windows NT 4.0 |
否 |
脚本代码
strDNSServer = "atl-dc-03.fabrikam.com"
strContainer = "fabrikam.com"
strOwner = "atl-srv-01.fabrikam.com"
intRecordClass = 1
intTTL = 600
strNSHost = "nameserver.fabrikam.com"
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftDNS")
Set objItem = objWMIService.Get("MicrosoftDNS_NSType")
errResult = objItem.CreateInstanceFromPropertyData _
(strDNSServer, strContainer, strOwner, intRecordClass, intTTL, strNSHost)