pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets

Home Page:https://pnp.github.io/powershell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Move-PnPFile moves file but it is undone after some time

HeKr09 opened this issue · comments

Reporting an Issue or Missing Feature

Move-PnpFile is not moving all files and I don't know when it moves or not.

Expected behavior

I expect to move all files

Actual behavior

I move several files with the code.
The most of the files are copied, still exist in the old page and then after some minutes are removed from the old site.
But some files are copied, still exist in the old page and then after some minutes are removed from the new site. So no success in moving.

Steps to reproduce behavior

$fileServerRelativeUrl = Get-PnPProperty -ClientObject $file -Property "ServerRelativeUrl"
$targetServerRelativeLibraryUrl = "$TargetWebServerRelativeUrl/$listUrlName"
Move-PnPFile -TargetServerRelativeLibrary $targetServerRelativeLibraryUrl -ServerRelativeUrl $fileServerRelativeUrl -Force

Which version of the PnP-PowerShell Cmdlets are you using?

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • PnP PowerShell for SharePoint 2019
  • PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

3.26.2010.0

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • Installed through the PowerShell Gallery with Install-Module
  • Other means