If you're migrating files from an on-prem file share to SharePoint, you may need to export a list of files on both sides for comparison:
- Install PnP PowerShell:
Install-Module -Name "PnP.PowerShell" - Connect to the SharePoint site URL:
Connect-PnPOnline -Url https://company-my.sharepoint.com/sites/SharedFiles -Interactive - Export the SharePoint files/folders in specific directory:
Get-PnPFolderItem -FolderSiteRelativeUrl "Shared Documents/Folder1" -Recursive | Export-Csv -Path C:\temp\Folder1-SharePoint.csv - Export the corresponding on-prem files/folders: In PowerShell on-prem, CD into the directory then:
dir -Recurse | Export-Csv -Path C:\temp\Folder1-OnPrem.csv
No comments:
Post a Comment