Forum Discussion

Mihir Yelamanchili's avatar
Mihir Yelamanchili
Brass Contributor
Nov 21, 2018

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 ROA's avatar
        Djavan ROA
        Brass 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)

Resources