How to retrieve 5 million documents from SharePoint site with metadata and export it to csv using PowerShell?

Anonymous
2023-06-16T07:31:18.4366667+00:00

I have SharePoint site where almost 200000 documents are there and I want retrieve all of the files from that particular SharePoint Site along with metadata. And after getting the data I need to export the files into csv.

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Paul de Jong 886 Reputation points
    2023-06-16T09:06:03.4733333+00:00
    Hi Sayantan,
      I am a bit confused. Do you need to export 200k documents or 5 M?
      What metadata do you need? only system metadata like modified, modifiedby, size etc.. or also custom metadata like projectID?
      Do you need versions or only the last version?
      Why do you need to export the files into csv? or do you need  a csv file with a list with all files?
    

    Do you also need to cater for very large files? e.g. 10's of GB's


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.