Fallback to IP from Assets when Hostname cant be resolved

Resolved

Fallback to IP from Assets when Hostname cant be resolved

0 vote

avatar

I got a few Clients where the DNS is not working properly like 50% of the time. I set up all my connections via Hostname and add the IP in the “Asset” section, is there a way to fall back to that IP when the Hostname cant be resolved after like 10 seconds?

All Comments (2)

avatar

Hello,

The following PowerShell script using the Before Open event should help to achieve your goal.

$myhost = Resolve-DNSName $HOST$
if ($myhost.IPAddress -eq $NULL)
{
    $RDM.Connection.Url = $RDM.connection.MetaInformation.IP
}
$RDM.Save();




Let us know if that helps.

Best regards,

Érica Poirier

94036fa1-6b56-408d-b87b-337cd172b65c.png

avatar

Hello,
That works pretty well.
Thank you very much for the fast answer.