SPORestrictedSiteCreation
Applies to : SharePoint Online
Sets or updates one or more group configurations for restricting site creation.
This cmdlet sets or updates the configuration or setting for the Restricted Site Creation feature.
Available cmdlets
Parameters
| Name | Type | Default value | Accepted values |
|---|---|---|---|
| Enabled | System.Boolean | ||
| Mode | Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationMode | Deny, Allow | |
| RestrictedSiteCreationGroups | System.String | ||
| AuditOnly | Boolean | ||
| SiteType | Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationSiteType | All, SharePoint, OneDrive, Team, Communication |
Examples
Example 1
Set-SPORestrictedSiteCreation –Enabled:$true Example 1 enables the restricted site creation feature for the tenant.
Example 2
Set-SPORestrictedSiteCreation –Mode Allow Example 2 sets restricted site creation to allow mode. In this mode, a user is only able to create a site if they are a member of a group specified for a matching site type.
Example 3
Set-SPORestrictedSiteCreation –SiteType "All" -RestrictedSiteCreationGroups "281e395b-7316-4cb2-b5bb-8881426ee411" Example 3 updates the policy for the All site type to apply to members of the Microsoft Entra security group with ID 281e395b-7316-4cb2-b5bb-8881426ee411. Members of this group are now either allowed or denied (depending on the current mode) from creating all OneDrive and SharePoint sites.
Example 4
Set-SPORestrictedSiteCreation –SiteType "Team" -RestrictedSiteCreationGroups "78159241-04a9-41d2-8dd4-ac568e9766a3,1f95829b-e1c8-4406-b2be-508c36f4bca5" Example 4 updates the policy for the Team site type to apply to members of the two specified groups. Members of both specified security groups are now either allowed or denied from creating Team sites, depending on the current mode.
Example 5
Set-SPORestrictedSiteCreation –SiteType "OneDrive" -RestrictedSiteCreationGroups "" Example 5 clears the policy for the OneDrive site type so that it no longer applies to any users.