IPs present on server: Initially configured statically with 10.10.20.100, it had two additional IPs added to the same NIC, 10.10.20.20 and 10.10.20.102.
A Record for server1.contoso.com points at 10.10.20.100
When pinging server1.contoso.com from another machine returns the proper IP of 10.10.20.100. Tracert shows going through the proper channels.
When pinging server1.contoso.com when on server1.contoso.com returns 10.10.20.20. Tracert shows it not going to DNS and resolves on the server to the lowest numerical IP.
Is there any solution for this occuring? I'm trying to write a script that will run on the server and return the IP that was configured as the static IP on the NIC properties.
Using a WMI class, I am able to see all the IPs on that NIC, so until now I have been assuming the first item in the array was what was configured, but ideally would rather just reach out to DNS to get the IP.