Hey Nik, just used the script that you posted – List All SharePoint Site Request Access Emails In A Web Application, super helpful. Just wanted to say, on behalf of the internet, thank you.
Thanks Gene! I’m happy you found it useful!
I found your excellent script for saving docs, list, metadata to the file system, but had one question.
# $ServerFileLocation: Where the source file is located on the web
# $DownloadPath: The destination to download to
function HTTPDownloadFile($ServerFileLocation, $DownloadPath)
$webclient = New-Object System.Net.WebClient
$webClient.UseDefaultCredentials = $true
I”m not seeing how you dynamically assign $serverfilelocation, it would seem this will change as the site is iterated thru for content?
Thanks for the comment, I’m glad you found the script useful! I’m reaching back in my memory as I haven’t looked at this in a while, but here goes.
To use the script, all you need to do is change the $site variable to the address of your SharePoint site and the $destination variable to where to download the material to, and it’ll download everything from that site. Changing the $ServerFileLocation variable isn’t necessary.
Details on this:
The HTTPDownloadFile function doesn’t need to be set manually, it’s actually called by the GetFileVersions function later on – this is because I couldn’t find a way to easily download previous versions of a file, but it IS possible to download them through a regular HTTP connection, just like using a web browser. GetFileVersions is called in the DownloadDocLib function, which is used to download an entire doc library, versions and all (thanks to GetFileVersions). The DownloadSite function is the main function that downloads all the documents + versions from an entire SharePoint site.
I discovered this after I sent the email. 🙂
Appreciate your reply,
Is there an associated script to import the CSV files output using the “Extract All Documents and their Versions” script?
Hi Dan, unfortunately not as of today.
Your email address will not be published. Required fields are marked *