使用Azure Automation Runbook向SPO添加项目

问题描述 投票:0回答:2

我想使用Azure Automation中的Runbook将项目添加到SharePoint Online中的列表。如下所示添加项目,但是出现消息“站点'https://[tenantID].sharepoint.com/sites/[sitename]'上的推送通知功能未激活””,我无法添加它。如果您在本地PowerShell中执行相同的命令,则可以添加项目,但我不知道原因,所以请告诉我。造成您的不便,敬请谅解。

`$ Credential = Get-AutomationPSCredential-名称'admin'$ SiteUrl =“ https://[tenantID].sharepoint.com/sites/[sitename]”Connect-PnPOnline –Url $ SiteUrl –Credentials(Get-Credential -Credential $ Credential)

Add-PnPListItem -List $ ListName -Values @ {“ Title” =“ TestTitle”;“ ID” =“ TestID”;“ Message” =“ TestMessage”;}`

powershell sharepoint azure-automation azure-runbook
2个回答
0
投票
Connect-PnPOnline https:/ /mytenant.sharepoint.com Enable-PnPFeature -Identity 41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092

BR

© www.soinside.com 2019 - 2024. All rights reserved.