title: Resolve-DNSName for Windows 2008
body: <p>I have a script working for Windows 2012 (PowerShell v4) but it has to work also for Windows 2008 (PowerShell v2), what is the equivalent of the cmdlet "Resolve-DNSName" for Windows 2008?</p>
  
  <pre><code>Resolve-DnsName -Name client01 -Server server01
  </code></pre>
  
  <p>I know it exists the same for nslookup and this is what I would like as a cmdlet (one-liner, with no input required from my part)</p>
  
  <pre><code>nslookup
  server server01
  client01
  </code></pre>
  
  <p>The following works for DNS resolution but is missing the -server parameter :</p>
  
  <pre><code>[Net.DNS]::GetHostEntry("MachineName")
  </code></pre>
  
  <p>Thanks</p>