This script will enable you to reset the krbtgt account password and related keys while minimizing the likelihood of Kerberos authentication issues being caused by the operation.
DNS resolution check on Single Label Domains fail and the script does not continue. Adding the snippet below before the line [System.Net.Dns]::gethostentry($targetedADforestFQDN) | Out-Null and replacing targetedADforestFQDN with targettedDnsFqdn worked for me.
DNS resolution check on Single Label Domains fail and the script does not continue. Adding the snippet below before the line [System.Net.Dns]::gethostentry($targetedADforestFQDN) | Out-Null and replacing targetedADforestFQDN with targettedDnsFqdn worked for me.
$targettedDnsFqdn = if ($targetedADforestFQDN -notmatch ".") { $targetedADforestFQDN + "." } else { $targetedADforestFQDN }