【问题标题】:Apply template to a sharepoint online site将模板应用到共享点在线站点
【发布时间】:2018-07-27 01:01:12
【问题描述】:

我正在使用 PnP 方法来获取发布站点模板并创建新站点集合并应用模板,以便获得源站点的副本。

我收到错误-运行时模板的范围与目标不匹配 下面的powershell脚本应用模板 - $web="https://shareptdev.sharepoint.com/sites/newpub/replicasite $templateFile = "E:\Path\template.xml"; Apply-PnPProvisioningTemplate -Web $web -Path $templateFile

【问题讨论】:

    标签: sharepoint-online


    【解决方案1】:

    变量 $web 必须是您的站点上下文,必须在连接的站点上使用 Get-PnPWeb。像这样的:

    $siteUrl = "https://shareptdev.sharepoint.com/sites/newpub/replicasite"
    Connect-PnPOnline -Url $siteUrl -UseWebLogin
    $web = Get-PnPWeb
    
    $templateFile = "E:\Path\template.xml"
    Apply-PnPProvisioningTemplate -Web $web -Path $templateFile
    
    猜你喜欢
    • 2016-05-21
    • 1970-01-01
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-13
    • 2017-08-30
    相关资源
    最近更新 更多