0

I wanted to ask, if it is possible with PowerShell to download a file from a webpage directly into a SharePoint Online library?

Alternatively, a download into a Azure Blob Storage would also work.

Thank you in advance.

I already tried the following without success:

Invoke-WebRequest -URI $URL -OutFile https://sharepoint.site.com/sites/library/file.docx

$URL = "htpps://webpage.com/file.docx"
$Path = "https://sharepoint.site.com/sites/library/file.docx"

(New-Object System.Net.WebClient).DownloadFile ($URL, $Path)
  • HTTPS is a protocol. You just want to write without protocol : Invoke-WebRequest -URI $URL -OutFile \\SERVER_NAME\library\file.docx. The folder has to be shared and allow users access. – jdweng Mar 22 '23 at 16:44

1 Answers1

0

Please make sure to try it with appropriate permissions.

Xyza_MSFT
  • 221
  • 1
  • 4