以编程方式将SharePoint Online网站移动到子网站 [英] Move a SharePoint Online site to a subsite programmatically
问题描述
大家好,
我想使用代码解决方案(PNP或CSOM)将SharePoint网站移动到子网站.
I would like to use a code-solution (PNP or CSOM) to move a SharePoint site to a subsite.
例如,这是受影响的网站(称为测试"):x.sharepoint.com/test
For instance, this is the site affected (called Test) : x.sharepoint.com/test
有一个名为存档"的子站点.
There is a subsite called archive.
我想将测试站点移至存档子站点.
I would like to move the Test site to the archive subsite.
因此,最终,测试站点应该位于以下位置:x.sharepoint.com/archive/test
So, eventually the Test site should be located as follows: x.sharepoint.com/archive/test
有人有某种参考来实现这一目标吗?因此,不是通过GUI,而是使用代码解决方案?
Does someone have some kind of reference to accomplish this? So not through the GUI, but using a code-solution?
与此相关的开箱即用功能https://social.technet.microsoft.com/Forums/sharepoint/en-US/caf7f375-02bf-4c88-b83e-28a8b22cc175/sharepoint-online-move-site到另一个站点内?forum = sharepointgeneral
It is related to this out of the box feature https://social.technet.microsoft.com/Forums/sharepoint/en-US/caf7f375-02bf-4c88-b83e-28a8b22cc175/sharepoint-online-move-site-to-within-another-site?forum=sharepointgeneral
在此先感谢您提供的帮助.
Many thanks in advance for the help provided.
亲切的问候,
Joost
推荐答案
嗨Joost,
Hi Joost,
对于SharePoint Online,目前没有API可以满足此要求,作为一种解决方法,我们可以将网站另存为模板,并使用PowerShell和CSOM在SharePoint Online中使用自定义模板创建SubSite(Web).
For SharePoint Online, there is not an API to achieve this requirement currently, as a workaround, we can save site as template and create a SubSite (Web) using a Custom Template in SharePoint Online using PowerShell and CSOM.
网络成员: https://msdn.microsoft.com/zh-CN/library/microsoft.sharepoint.client.web_members.aspx
Web Members: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.web_members.aspx
这里有一个类似的线程供您参考:
Here is a similar thread for your reference:
最好的问候,
这篇关于以编程方式将SharePoint Online网站移动到子网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!