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

[玩转系统] 如何在SharePoint网站中创建默认组?

作者:精品下载站 日期:2024-12-14 20:58:39 浏览:17 分类:玩电脑

如何在SharePoint网站中创建默认组?


问题:
当您通过 SharePoint Web UI 创建新网站集时,会自动创建默认 SharePoint 组。但是,当您以编程方式或使用 PowerShell(例如 New-SPSite 或 New-SPWeb)创建 SharePoint 网站时,不会自动创建默认网站组(例如访问者、成员、所有者)!

从 UI 创建默认组:您可以通过导航到以下位置从 SharePoint UI 获取默认组页面:https://your-sharepoint-site.com/_layouts/permsetup.aspx 。 输入群组详细信息并点击“保存”。

[玩转系统] 如何在SharePoint网站中创建默认组?

如何创建默认的 SharePoint 组?
您必须显式调用方法:SPWeb.CreateDefaultAssociatedGroups 来创建默认用户组在 SharePoint 中。

使用 PowerShell 以编程方式创建默认用户组:

要配置默认站点组,请使用以下 PowerShell:


Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue

#Variables for Site collection
$SiteURL ="https://intranet.crescent.com"
$Site = Get-SPSite $SiteURL

#get the Root Web object
$RootWeb = $Site.RootWeb

$GroupOwner = "i:0#.w|global\salaudeen" 
$RootWeb.CreateDefaultAssociatedGroups($GroupOwner, "", $RootWeb.title)

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

取消回复欢迎 发表评论:

关灯