Forum Discussion

andrewmcn's avatar
andrewmcn
Copper Contributor
Apr 11, 2021

PowerShell DnsServer module and DKIM 2048-bit keys

I haven't checked 2019 yet but 2016's Add-DnsServerResourceRecord cmdlet can't handle a key that goes beyond the 255 character limit. The mmc for DNS appears to support this just fine.

 

I've tried various workarounds but as soon as you cross that 255 limit, the cmdlet fails. This is a real pain in the neck if you've got 162 domains to manage and want to inject DKIM public keys into all of them with a script.

 

Even Microsoft is now recommending the use of 2048-bit keys in its M365 documentation. I've had to stick with 1024-bit for now and manual set critical domains to 2048-bit. I hope Microsoft fixes this issue back to Windows Server 2016 urgently.

 

Has anyone figured out any workarounds to this issue?

 

T.I.A.

Resources