Prerequisite - Download SharePoint Online Client Components SDK from Official Microsoft Download Center 


For reference - SharePoint Online: Download All Files from a Document Library using PowerShell - SharePoint Diary 


  • Copy and paste data in txt file into powershell (after installing pre-requisites above).
  • Ensure that you modify #Set parameter values to the correct values.
  • You can obtain the site url by going to the users profile in 365 admin - users - active users - go to the one drive tab - click on "create link to files" copy the link generated and paste into $SiteURL
  • Change $TargetFolder to a location on your local disk (or to a synced- sharepoint location) ensure that you transfer the data from a local location to the GA archives if that is desired.