求用WMI添加A TYPE记录和MX记录的参数设置……

kidy_0626 2005-03-25 11:55:09
在微软上找了些脚本但无法运行通过,究竟那些参数出错??
望高人指点一下
strDNSServer = "atl-dc-03.abc.com"
strContainer = "abc.com"
strOwner = "workstation5.abc.com"
intRecordClass = 1
intTTL = 600
strIPAddress = "192.168.1.100"
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftDNS")
Set objItem = objWMIService.Get("MicrosoftDNS_AType")
errResult = objItem.CreateInstanceFromPropertyData _
(strDNSServer, strContainer, strOwner, intRecordClass, intTTL, strIPAddress)




这是CreateInstanceFromPropertyData 的说明地址
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dns/dns/microsoftdns_atype_createinstancefrompropertydata.asp


还有MX的脚本,
strDNSServer = "atl-dc-03.st8888.com"
strContainer = "st8888.com"
strOwner = "atl-dc-03.st8888.com"
intRecordClass = 1
intTTL = 600
intPreference = 0
strMailExchanger = "mailexchanger.st8888.com"

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\MicrosoftDNS")
Set objItem = objWMIService.Get("MicrosoftDNS_MXType")
errResult = objItem.CreateInstanceFromPropertyData _
(strDNSServer, strContainer, strOwner, intRecordClass, intTTL, _
intPreference, strMailExchanger)


...全文
14 点赞 收藏 1
写回复
1 条回复
kidy_0626 2005年03月25日
有没有人帮忙啊
回复 点赞
发动态
发帖子
ASP
创建于2007-09-28

1.9w+

社区成员

35.7w+

社区内容

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区公告
暂无公告