当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 在 SharePoint Online 中的租户级别禁用 Kindle/YouTube/Twitter Web 部件

作者:精品下载站 日期:2024-12-14 21:25:18 浏览:15 分类:玩电脑

在 SharePoint Online 中的租户级别禁用 Kindle/YouTube/Twitter Web 部件


SharePoint Online 管理员可以使用 PowerShell cmdlet Set-SPOTenant -DisabledWebPartIds @(“Web 部件 ID”) 在租户级别隐藏 Kindle/YouTube/Twitter Web 部件,这些部件默认包含在现代 SharePoint Online 网站 Web 部件工具箱中。要禁用特定 Web 部件,您需要输入其 GUID 作为参数:

  • 推特(f6fdf4f8-4a24-437b-a127-32e66a5dd9b4)。
  • 亚马逊 Kindle (46698648-fcd5-41fc-9526-c7f7b2ace919)
  • YouTube (544dd15b-cf3c-441b-96da-004d5a8cea1d)

PowerShell 在 SharePoint Online 中禁用 Kindle/YouTube/Twitter Web 部件:

您可以通过提供 Web 部件的 GUID 来单独禁用任何 Web 部件或禁用多个 Web 部件。


$AdminSiteURL = "https://crescent-admin.sharepoint.com"

Connect-SPOService -url $AdminSiteURL -Credential (Get-Credential)

#Disable Twitter, YouTube, Kindle Web Parts
Set-SPOTenant -DisabledWebPartIds @("f6fdf4f8-4a24-437b-a127-32e66a5dd9b4","544dd15b-cf3c-441b-96da-004d5a8cea1d", "46698648-fcd5-41fc-9526-c7f7b2ace919")

执行后,需要一些时间才能反映更改,然后这些 Web 部件将不再在 Web 部件工具箱中对用户可见或呈现内容。要进行验证,请运行以下 cmdlet 以获取所有禁用的 Web 部件:


Get-SPOTenant | Select DisabledWebPartIds

要重置禁用的 Web 部件,请使用以下命令:


#Reset Disabled Web Parts
Set-SPOTenant -DisabledWebPartIds @()

此 cmdlet 仅支持 Kindle/YouTube/Twitter Web 部件,截至目前不支持隐藏其他 Web 部件!

[玩转系统] 在 SharePoint Online 中的租户级别禁用 Kindle/YouTube/Twitter Web 部件

参考:https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/Set-SPOTenant?view=sharepoint-ps

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯