Hi @Krish ,
Explorer view can do this. Go to the Document Library and choose Open with Explorer from the Ribbon
Now in the Explorer view, navigate one level up, and you can download the complete site or site collection using explorer view by navigating up and down to the site, list or library objects.
Please refer to the following code
#Configuration Parameters
$DownloadPath= "c:\Downloads\Online"
#$WebDavUrl = "\\intranet.crescent.com\DavWWWRoot\sites\operations"
$webDavUrl = "\\crescent.sharepoint.com@SSL\DavWWWRoot\sites\operations" #SharePoint Online
#Create Local Folder it it doesn't exists
If(!(Test-Path $DownloadPath))
{
New-Item -ItemType Directory -Force -Path $DownloadPath | Out-Null
}
#Get All files from the Site and download to local folder
Get-ChildItem -Path $webDavUrl -Recurse | ForEach-Object {
#Frame the destination path
$DestinationPath = Join-Path -Path $DownloadPath -ChildPath (Split-Path $_.FullName -NoQualifier).Replace($webDavUrl,'');
#Copy File to local path
Copy-Item $_.FullName -Destination $DestinationPath -Force
Write-host -f Green File Copied to $DestinationPath
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.