Forum Discussion
Mihir Yelamanchili
Nov 21, 2018Brass Contributor
How to count files after migration?
I am migrating file share data to SP online using a tool. I am able to migrate the data. There are hundreds of files and folders that need to migrate to one document library. When I right click on any folder and check the properties, it is giving one count. This count is not matching with the Document Library items count.
What is the best way to validate the migrated items?
3 Replies
- Djavan ROABrass Contributor
Hi, does your count need to include versions of items ?
- Mihir YelamanchiliBrass ContributorNo, not required to count versions.
- Djavan ROABrass Contributor
Have you tried something like this first?
Connect-PnPOnline -Url "https://<tenant>.sharepoint.com/sites/demo-dro1"
$doclib = Get-PnPList -Identity "Documents"
Write-Host ("Items count: " + $doclib.ItemCount)