Downloading a document from SharePoint

May 12, 2015 at 8:25 AM
Added a short code snippet to demonstrate the usage of Invoke-WebRequest to download a document from SharePoint to local disk.

I have also added a code snippet to download documents from a document by using a CAML query. The trick is to use get-splistitems to fetch the list items first and then iterate over the list items and download each file. The URL of a document can be obtained by using the EncodedAbsUrl property. The property FSObjType will tell you whether the list item is a file or a folder.

Thank you,