title: Download file using PowerShell commandlet
body: <p>The command is working fine with <a href="https://en.wikipedia.org/wiki/Windows_Server_2012" rel="nofollow">Windows Server 2012</a> (PowerShell 4.0), but it is not working with Windows&nbsp;8 (PowerShell 4.0) for the same.</p>
  
  <p>I want to download a file from an <a href="http://en.wikipedia.org/wiki/Internet_Information_Services" rel="nofollow">IIS</a> server. </p>
  
  <pre><code> (New-Object System.Net.WebClient).DownloadFile('http://server12/vdir/v.exe','C:\pqr.exe')
  </code></pre>
  
  <p>I  tried this. It worked fine for me on Windows Server 2012, but on Windows&nbsp;8 it gave me a method invocation error:</p>
  
  <blockquote>
    <p>Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request. </p>
  </blockquote>