我正在使用Move-PnPFolder在SharePoint网站中移动文件夹,但这不会将文件夹从一个网站移动到另一个网站!有什么方法可以做到,因为它是Web UI中的一个选项?
答案 0 :(得分:0)
根据github上Microsoft的答案,MovePnPFolder当前缺少此功能。相反,他们提出了另一条命令Move-PnPFile
,将文件夹/文件从一个站点移动到另一个站点。虽然该命令看起来仅限于文件,但实际上并非如此,它还可以移动文件夹
Move-PnPFile -ServerRelativeUrl /sites/source/shared%20documents/Test -TargetServerRelativeLibrary /sites/target/shared%20documents -Force -OverwriteIfAlreadyExists -IgnoreVersionHistory -AllowSmallerVersionLimitOnDestination -AllowSchemaMismatch
答案 1 :(得分:0)
您还可以查看以下方法,它们可以将文件/文件夹移动到另一个站点:
演示:https://www.sharepointdiary.com/2018/03/sharepoint-online-move-files-using-powershell.html