Problems with DNS can sometimes go undetected because they’re not the easiest to detect. I ran into a scenario where servers were “falling out of DNS” a term coined by a systems guy I’m sure. Either way, by all means a server in this state appears to be ok, other than the fact that you can’t connect to it via its FQDN.
I wasn’t in the habit of checking FQDN because everything was in the same domain for years and years and years, until that was no longer the case.
Check to see if the server has a valid FQDN
Check to see if the server has a valid FQDN and we can ping it.
# 1 = all good
# 0 = something not workie
If ((test-connection ([System.Net.Dns]::GetHostEntry([string]$env:computername).HostName) -quiet -count 5) -like 'true')