windows-powershell-docs icon indicating copy to clipboard operation
windows-powershell-docs copied to clipboard

Example 8 multiline TXT records does not work

Open spardoko opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • [X] Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • [X] Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

https://github.com/MicrosoftDocs/windows-powershell-docs/blob/main/docset/winserver2012-ps/dnsserver/Add-DnsServerResourceRecord.md

Summary

Example 8 - Adding a multiline txt record does not work. The DescriptiveText will not accept more than 255 chars whether the field is provided with ps variables or not. I tried on both ps 5.1 and ps 7.4.1 on Windows 2022 running DNS Server. The example only works as its written because the entire string is only 253 characters.

Details

We are able to add multiline TXT entries with each line being up to 255 characters only through the DNS Server GUI. There is no way to do it via ps.

Suggested Fix

Please modify the code to allow for multiline TXT resource records.

spardoko avatar Feb 13 '24 15:02 spardoko