title: How to download full repository using PowerShell?
body: <p>I use this power shell script to download files from Git Hub repository </p>
  
  <pre><code>$url = "https://gist.github.com/ . . ./test.jpg"
  $output = "C:\Users\admin\Desktop\test.jpg"
  $start_time = Get-Date
  
  $wc = New-Object System.Net.WebClient
  $wc.DownloadFile($url, $output)
  #OR
  (New-Object System.Net.WebClient).DownloadFile($url, $output)
  
  Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" 
  </code></pre>
  
  <p>It works well for one file. How can I download the full repository using PowerShell? I cannot use <code>git pull</code>. </p>
  
  <p><strong>EDIT</strong>
  Here is what I tried on a real repository.</p>
  
  <p>Repository: <a href="https://github.com/githubtraining/hellogitworld/archive/master.zip" rel="nofollow noreferrer">https://github.com/githubtraining/hellogitworld/archive/master.zip</a></p>
  
  <p>Here is a test code, but it doesn't download the repository completely</p>
  
  <pre><code>$url = "https://github.com/githubtraining/hellogitworld/archive/master.zip"
  $output = "C:\Users\mycompi\Desktop\test\master.zip"
  $start_time = Get-Date
  
  $wc = New-Object System.Net.WebClient
  $wc.DownloadFile($url, $output)
  
  Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
  </code></pre>