【问题标题】:SharePoint PnP Provisioning with Azure on SharePoint Subsite在 SharePoint 子站点上使用 Azure 进行 SharePoint PnP 预配
【发布时间】:2021-12-05 06:24:51
【问题描述】:

希望你们做得最好,实际上我在使用 PnP PowerShell 脚本在带有 Azure 的 SharePoint 子站点上实现根站点模板时遇到问题。在网络上进行大量搜索后,我尝试使用 Azure 存储帐户和 Azure 功能来实现。我还在 template.xml 文件中更改了“Scope='Web'”,但模板不再适用,也没有错误,但函数运行成功。我在这里提供代码,请看看并帮助我。提前致谢。

使用 Azure 自动化

Connect-PnPOnline -ClientId "**********" -ClientSecret "**********" -Url "https://Contoso.sharepoint.com/sites/ TargetComSite/agreement_47" Get-PnPProvisioningTemplate -Out template.pnp -IncludeAllClientSidePages -PersistBrandingFiles

Connect-PnPOnline -ClientId "**********" -ClientSecret "**********" -Url "https://Contoso.sharepoint.com/sites/ TargetComSite/agreement_49" Apply-PnPProvisioningTemplate -Path .\template.pnp

使用 Azure 函数

参数($Request, $TriggerMetadata)

#$requestBody = 获取内容 $Request -Raw | ConvertFrom-Json

$path = "C:\home" $env:PSModulePath += ";$path\Modules\SharePointPnPPowerShellOnline" 写输出“运行 PnP 版本:” (Get-Module -Name SharePointPnPPowerShellOnline -ListAvailable).Version

Connect-PnPOnline -AppId "#####" -AppSecret "******************" -Url https://Contoso.sharepoint.com/sites/TargetComSite/agreement_49

Apply-PnPProvisioningTemplate -Path C:\home\site\wwwroot\ApplyPnPProvisioningTemplate\template.xml -ClearNavigation

【问题讨论】:

  • 您能提供给我们您遇到的错误的屏幕截图吗?
  • 嗨@HariKrishnaRajoli-MT 实际上没有错误出现,函数运行成功但未应用模板

标签: azure powershell sharepoint provisioning sitetemplate


【解决方案1】:

我有同样的问题,解决方法就是等待。有时更改不会直接应用,需要一些时间(在某些情况下需要几个小时)才能应用

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-08
    • 2020-05-25
    • 2023-02-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多