When your domain controller has been offline for > 60 days

When trying to demote a domain controller which had been powered off for several months, I ran into this error:

Also, the new domain controller that I'd just spun up couldn't access the NETLOGON share.

DCDIAG had this warning:

The DFS replication event log had this warning, with instructions that don't work:

Thankfully, this blog post explained what to do (all on one line):

wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=200