PowerShell: Download Documents/Files from SharePoint OnPrem

$Spsite = get-spsite http://contoso.com #Replace this with Site Collection URL $Location = “C:\destination” #Replace with Folder on file level system where you want to download the files and folders $AllWebs = $SpSite.AllWebs function DownloadFiles ($SiteFolder , $Web , $List) { $Web = Get-Spweb $Web $list = $web.Lists.GetList($list,$true) $items = $list.Items foreach($item in $items) { $FileBinary…