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

代码通过调用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")


你可能感兴趣的:(powershell,wmi,DNS注册)