title: powershell how to resolve name to IP address using Windows method
body: <p>I see people using this:</p>
  
  <pre><code>[Net.DNS]::GetHostEntry("serverName").addressList[0].IPAddressToString
  </code></pre>
  
  <p>...and that will work for me. Except, what if I have an entry in the hosts file? Does this use the same method that Windows uses or skip the DNS cache and hosts file and always query a DNS server? I would like to use whatever method Windows uses for browers, Windows Explorer, ping, etc.</p>