How to set multiline TXT fields with Add-DnsServerResourceRecord?
I want to use DNS Policies (ZoneScope), and this requires that I use Powershell Cmdlets to manage DNS entries, as it can't be done via the DNS MMC.
Below is an example of a multiline TXT record I want to create ... I can just paste this in when using the DNS MMC to create a multiline TXT record dnsmg.png (but that is the default and cannot be targeted to a specific ZoneScope). DNSCMD.EXE does support multiline TXT records, but it does not support ZoneScopes.
When I try to add the record (here without ZoneScope for simplicity) Add-DnsServerResourceRecord -DescriptiveText "$txtrecords" -Name test4._tcp._ipps -Txt -ZoneName $domain -TimeToLive 0:1:0:0
I get an error (adsrr.png), which appears to be because the $txtrecords data is too big (when I shorten $txtrecords, it works).
How can I create a multi-line TXT record, in a ZoneScope, using Add-DnsServerResourceRecord?
txtvers=1
qtotal=1
rp=ipp/print/printer7
product=printer7
URF=CP255,DM1,FN3-4-5-8-20,IS1-4,OB10,PQ4,RS300,SRGB24,V1.4,W8
pdl=image/urf,application/octet-stream,image/jpeg,application/pdf
adminurl=https://myhost.mydomain.com/ipp/something:8008/printer.htm?name=printer7
kind=document,envelope,postcode
air=username,password
note=Test printer
Binary=T
Bind=F
Color=T
Collate=T
Copies=T
Duplex=T
Fax=F
Scan=F
Staple=T
Transparent=T
Punch=2
PaperMax=tabloid-A3
TLS=1.2