对于TXTlogging,dnscmd / RecordAdd的RRData参数的格式是什么?

TXTlogging的格式是:

owner TTL class TXT text_string 

dnscmd.exe的文档为\ recordadd命令提供了以下语法:

 dnscmd [<ServerName>] /recordadd <ZoneName> <NodeName> <RRType> <RRData> 

for / recorddelete与可选的[/f]标志几乎相同

 dnscmd <ServerName> /recorddelete <ZoneName> <NodeName> <RRType> <RRData>[/f] 

对于RRType TXT RRData具有以下语法。

 <string> [<string>] 

我无法find一个解释或明确的使用例子

这两个参数如何映射到TXTlogging中的text_string?

由于TXT <RRType>的使用文本显示:

  TXT <String> [<String>] 

<RRData>的有效input数据是一个或多个string。 如果你input了多个string,dnscmd会添加一个单独的logging,其中包含你input的string的逗号分隔列表,因为它的值。

所以

 dnscmd /recordadd contoso.com. mytxt TXT this is the value 

将导致以下TXTlogging:

 mytext.contoso.com. [TTL] IN TXT "this, is, the, value" 

如果你需要input一个空格作为单个string值的string,只需用""括起来:

 dnscmd /recordadd contoso.com. mytxt TXT "this is the value" 

这将导致:

 mytext.contoso.com. [TTL] IN TXT "this is the value"