Today I’ll share a little PowerShell script I made some time ago. It allows you to download all files of a single library, looping through all subfolders. This script use PNP PowerShell .
It was done for Office365 but should work the same way for onpremise. You just need to update the parameter on the top and run it. It will prompt you for your credentials to access the site and then download all the files to the specified directory (creating it if it doesn’t exist)
Hoping this helps!