title: how to get the HostName from powershell?
body: <p>How do I get the <a href="https://stackoverflow.com/q/42014215/262852">hostname</a> for <code>dur</code> from powershell?</p>
  
  <pre><code>PS /home/thufir/powershell&gt; 
  PS /home/thufir/powershell&gt; ./hostname.ps1                                                                              
  google.com
  localhost
  PS /home/thufir/powershell&gt; 
  PS /home/thufir/powershell&gt; cat ./hostname.ps1                                                                          
  $hosts = ("google.com", "localhost")
  
  foreach($i in $hosts) {
    $fqdn = [System.Net.Dns]::GetHostEntry($i).HostName
    write-host $fqdn
  }
  PS /home/thufir/powershell&gt; 
  PS /home/thufir/powershell&gt; hostname                                                                                    
  dur
  PS /home/thufir/powershell&gt; 
  </code></pre>
  
  <p>The FQDN for the system is actually <code>dur.bounceme.net</code>, which would be the preferred output.</p>