How to count files after migration?

Brass Contributor

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

Hi, does your count need to include versions of items ?

No, not required to count versions.

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)