Create a report on all file versions in the library

Powershell script that generates a report on available file versions in one SharePoint Online library. It iterates through folders and subfolders in order to retrieve all items. Requires SharePoint Online SDK.

5 Star
1,355 times
Add to favorites
Office 365
E-mail Twitter Digg Facebook
  • OneDrive?
    3 Posts | Last post August 14, 2018
    • Could you please let me know if you can do this for OneDrive?
      When running it says the following "A parameter cannot be found that matches parameter name 'password'
      And also "A parameter cannot be found that matches parameter name 'ListTitle'.
    • Hi Joey MCAT,
      Thank you for checking out the script.  I will run some tests against ODB and keep you updated here.
    • Hi Joey,
      Here's an adjusted version for OneDrive for Business. I'd appreciate your feedback:
  • For All sites
    2 Posts | Last post January 09, 2018
    • Could you please let me know, if we can run on all site in the farm? 
    • Hi Mast,
      Yes, you can do that but you'd need to modify the script:
      1) The authentication is set to SharePoint Online so please modify it to authenticate to on premise environment. This article might be helpful:
      2) You need to loop through all the sites
      Retrieve all the sites you are interested in, e.g. with Get-SPSite cmdlet and put the following line inside the loop:
      Get-SPOFolderFiles -Username $username -Url $Url -password $AdminPassword -ListTitle $ListTitle -CSVPath $csvPath -CSVPath2 $csvPath2