title: powershell script to search and copy files linked on https site
body: <p>How do i modify my script to search for files on https?</p>
  
  <pre><code>$source = "https://mysite/searchfolder"
  $destination = "\\Transfer"
  
  $searchFiles = Import-CSV 'C:\Users\user1\Desktop\test2.csv' -Header ("filename")
  
  ForEach($File in $searchFiles) 
  {
      Get-ChildItem -Path $source | Where-Object { $_.Name -match $File.filename } | Copy-Item -Destination $destination    
  }
  </code></pre>
  
  <p>This script gives the error</p>
  
  <pre><code>Get-ChildItem : Cannot find drive. A drive with the name 'https' does not exist.
  </code></pre>
  
  <p>I've been reading that I'll probably need to use <code>Invoke-WebRequest</code> but I'm not sure how to build that into my script. Any pointers would be appreciated.</p>