Using move-pnpfile, how to check progress?

Dennington, Casey 0 Reputation points
2024-05-31T17:54:29.0333333+00:00

I'm using move-pnpfile to move data from one site doc library to another. The initial command was performed over 12 hours ago and I still do not see completion. I formulated my command from examples I found in MS documentation (sanitized command below). When I run the job status section, nothing is returning that is helpful and there are few real world examples of the Receive-PnPCopyMoveJobStatus cmdlet in use.

The move process has started and made some progress but has not completed and I'm not sure how to tell when it might or how to see any progress for that matter.

I have several other moves to make and prefer not to use the browser or buy a third party tool, but if I can't reliably see progress and be able to communicate that to users then I'm out of ideas.

$job = Move-PnPFile -SourceUrl "sites/Site1/Shared Documents/Acct/Third Party Accounting/Partners" -TargetUrl "sites/Site2/Document Library/Archive" -AllowSchemaMismatch -NoWait

$jobStatus = Receive-PnPCopyMoveJobStatus -Job $job
if($jobStatus.JobState == 0)
{
  Write-Host "Job finished"
}
Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-06-03T02:41:11.58+00:00

    Hi @Dennington, Casey,

    Thank you for posting in this community.

    Unfortunately, SharePoint doesn’t provide a direct way to get real-time progress updates during file moves via PowerShell. The Receive-PnPCopyMoveJobStatus cmdlet doesn’t provide real-time progress updates but only indicates whether the job has completed.

    Please use your command to migrate a small number of files to see if you can actually migrate them successfully. If successful, it is likely that the number of files you migrate at one time exceeds the limit or the number of files is too large, we recommend that you migrate in batches.

    User's image


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.