您的位置:首页 > 运维架构 > Shell

【Powershell】【DNS】通过Powershell远程注册静态DNS

2015-08-13 09:15 411 查看
代码通过调用DNS服务器的wmi端口远程注册静态DNS记录

$dnsServerName="08dc01.mok.com"
$containerName="mok.com"
$dns =[WmiClass]"\\08dc01.mok.com\root\MicrosoftDNS:MicrosoftDNS_ResourceRecord"
$dns.CreateInstanceFromTextRepresentation($dnsServerName, $containerName, "bb.mok.com IN A 127.0.0.3")

本文出自 “精华荟萃” 博客,请务必保留此出处http://simy88.blog.51cto.com/7370552/1684226
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: