<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://sufan.maytide.net/read.php/877.htm</link>
<title><![CDATA[创建名称服务器 DNS 记录]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[PowerShell 和脚本]]></category>
<pubDate>Thu, 30 Mar 2006 10:51:20 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/877.htm</guid> 
<description>
<![CDATA[ 
	<table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr><td valign="top"><span><p>本文摘自：<a href="http://www.microsoft.com/china/technet/community/scriptcenter/network/scrnet153.mspx"></a><a href="http://www.microsoft.com/china/technet/community/scriptcenter/network/scrnet153.mspx" target="_blank">http://www.microsoft.com/china/technet/community/scriptcenter/network/scrnet153.mspx</a></p><p><strong><br />描述</strong></p><p>在 DNS 服务器上创建名称服务器 (NS) 记录。</p><p>有关在这段代码中使用的 CreateInstanceFromPropertyData 方法的更多信息，请单击<a href="http://msdn.microsoft.com/library/en-us/dns/dns/microsoftdns_nstype_createinstancefrompropertydata.asp">此处</a>。</p><p><strong><br />支持平台</strong></p><table border="0" cellspacing="0" cellpadding="0" class="dataTable" id="ENB"><thead></thead><tbody><tr class="record" valign="top"><td><p class="lastInCell"><strong>Windows Server 2003</strong></p></td><td style="border-right: #cccccc 1px solid"><p class="lastInCell"><strong>是</strong></p></td></tr><tr class="evenRecord" valign="top"><td><p class="lastInCell"><strong>Windows XP</strong></p></td><td style="border-right: #cccccc 1px solid"><p class="lastInCell"><strong>否（然而，可以在 Windows XP 计算机上对远程 DNS 服务器运行脚本）</strong></p></td></tr><tr class="record" valign="top"><td><p class="lastInCell"><strong>Windows 2000</strong></p></td><td style="border-right: #cccccc 1px solid"><p class="lastInCell"><strong>是，需要安装 DNS WMI 提供程序</strong></p></td></tr><tr class="evenRecord" valign="top"><td><p class="lastInCell"><strong>Windows NT 4.0</strong></p></td><td style="border-right: #cccccc 1px solid"><p class="lastInCell"><strong>否</strong></p></td></tr></tbody></table><p><br /><strong>脚本代码<br /></strong>strDNSServer = &quot;atl-dc-03.fabrikam.com&quot;<br />strContainer = &quot;fabrikam.com&quot;<br />strOwner = &quot;atl-srv-01.fabrikam.com&quot;<br />intRecordClass = 1<br />intTTL = 600<br />strNSHost = &quot;nameserver.fabrikam.com&quot;<br />strComputer = &quot;.&quot;<br />Set objWMIService = GetObject(&quot;winmgmts:&#92;&#92;&quot; &amp; strComputer &amp; &quot;&#92;root&#92;MicrosoftDNS&quot;)<br />Set objItem = objWMIService.Get(&quot;MicrosoftDNS_NSType&quot;)<br />&nbsp; &nbsp;errResult = objItem.CreateInstanceFromPropertyData _<br />&nbsp; &nbsp; &nbsp; &nbsp;(strDNSServer, strContainer, strOwner, intRecordClass, intTTL, strNSHost)</p></span></td></tr></tbody></table>
]]>
</description>
</item>
</channel>
</rss>