Skip to content

Commit 431e92d

Browse files
authored
Merge pull request #757 from vgaddam-pm/patch-1
Create Set-SPORestrictedSiteCreation.md
2 parents 520c5b6 + d22c638 commit 431e92d

File tree

2 files changed

+181
-0
lines changed

2 files changed

+181
-0
lines changed
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
external help file: sharepointonline.xml
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/set-sporestrictedsitecreation
5+
applicable: SharePoint Online
6+
title: Set-SPORestrictedSiteCreation
7+
schema: 2.0.0
8+
author: vgaddam-pm
9+
ms.author: vgaddam
10+
ms.reviewer: jmcdowe
11+
---
12+
13+
# Set-SPORestrictedSiteCreation
14+
15+
## SYNOPSIS
16+
17+
Sets or updates one or more group configurations for restricting site creation.
18+
19+
## SYNTAX
20+
21+
### ParamSet1
22+
23+
```powershell
24+
Set-SPORestrictedSiteCreation
25+
[-Enabled <Boolean>]
26+
[-Mode <RestrictedSiteCreationMode>]
27+
[-SiteType <RestrictedSiteCreationSiteType>]
28+
[-RestrictedSiteCreationGroups <String>]
29+
```
30+
31+
## DESCRIPTION
32+
33+
This cmdlet sets or updates the configuration or setting for the Restricted Site Creation feature.
34+
35+
> [!Important]
36+
> You must use version 16.0.25513.12000 (published November 2024) or later of the [SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online) for these commands to function properly. Earlier versions do not have the current list of site types and will not operate correctly.
37+
38+
## EXAMPLES
39+
40+
### Example 1
41+
42+
```powershell
43+
Set-SPORestrictedSiteCreation –Enabled:$true
44+
```
45+
46+
Example 1 enables the restricted site creation feature for the tenant.
47+
48+
### Example 2
49+
50+
```powershell
51+
Set-SPORestrictedSiteCreation –Mode Allow
52+
```
53+
54+
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.
55+
56+
### Example 3
57+
58+
```powershell
59+
Set-SPORestrictedSiteCreation –SiteType "All" -RestrictedSiteCreationGroups "281e395b-7316-4cb2-b5bb-8881426ee411"
60+
```
61+
62+
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.
63+
64+
### Example 4
65+
66+
```powershell
67+
Set-SPORestrictedSiteCreation –SiteType "Team" -RestrictedSiteCreationGroups "78159241-04a9-41d2-8dd4-ac568e9766a3,1f95829b-e1c8-4406-b2be-508c36f4bca5"
68+
```
69+
70+
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.
71+
### Example 5
72+
73+
```powershell
74+
Set-SPORestrictedSiteCreation –SiteType "OneDrive" -RestrictedSiteCreationGroups ""
75+
```
76+
77+
Example 5 clears the policy for the `OneDrive` site type so that it no longer applies to any users.
78+
79+
## PARAMETERS
80+
81+
### -Enabled
82+
83+
PARAMVALUE: true | false
84+
Enables or disables Restricted Site Creation feature in tenant.
85+
86+
```yaml
87+
Type: Boolean
88+
Parameter Sets: ParamSet1
89+
Aliases:
90+
Applicable: SharePoint Online
91+
Required: False
92+
Position: Named
93+
Default value: None
94+
Accept pipeline input: False
95+
Accept wildcard characters: False
96+
```
97+
98+
### -Mode
99+
100+
Specifies whether policies allow or deny users from creating sites.
101+
PARAMVALUE: Deny | Allow
102+
• Deny – a user will be blocked from creating a site if any policy applies to them.
103+
• Allow – a user will only be allowed to create a site if a policy applies to them.
104+
105+
> [!NOTE]
106+
> The restricted site creation mode is shared across all site type policies. It is not possible to use deny mode for one site type and allow mode for a different site type. When the mode is changed, all polices are cleared.
107+
108+
```yaml
109+
Type: RestrictedSiteCreationMode
110+
Parameter Sets: ParamSet1
111+
Aliases:
112+
Applicable: SharePoint Online
113+
Required: False
114+
Position: Named
115+
Default value: None
116+
Accept pipeline input: False
117+
Accept wildcard characters: False
118+
```
119+
120+
### -SiteType
121+
122+
When paired with the `–RestrictedSiteCreationGroups` parameter, creates a new policy which applies to the specified types of sites.
123+
124+
PARAMVALUE: All | SharePoint | OneDrive | Team | Communication
125+
• All - OneDrive and all SharePoint sites
126+
• SharePoint - All SharePoint sites (but not OneDrive)
127+
• OneDrive - Only OneDrive
128+
• Team - Only SharePoint team sites (group-connected and classic)
129+
• Communication - Only SharePoint communication sites
130+
131+
132+
```yaml
133+
Type: RestrictedSiteCreationSiteType
134+
Parameter Sets: ParamSet1
135+
Aliases:
136+
Applicable: SharePoint Online
137+
Required: False
138+
Position: Named
139+
Default value: None
140+
Accept pipeline input: False
141+
Accept wildcard characters: False
142+
```
143+
144+
### -RestrictedSiteCreationGroups
145+
146+
A comma-separated list of up to 10 Microsoft Entra security group IDs. When paired with the `–SiteType` parameter, defines a new policy which applies to the specified groups.
147+
Set to the empty string ("") to clear the policy for a site type.
148+
149+
```yaml
150+
Type: String
151+
Parameter Sets: (All)
152+
Aliases: cf
153+
Applicable: SharePoint Online
154+
Required: False
155+
Position: Named
156+
Default value: None
157+
Accept pipeline input: False
158+
Accept wildcard characters: False
159+
```
160+
161+
### CommonParameters
162+
163+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
164+
165+
## INPUTS
166+
167+
## OUTPUTS
168+
169+
## NOTES
170+
171+
## RELATED LINKS
172+
173+
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at [Intro to SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell?view=sharepoint-ps).
174+
175+
[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)
176+
177+
[Set-SPORestrictedSiteCreation](Set-SPORestrictedSiteCreation.md)

sharepoint/sharepoint-ps/sharepoint-online/sharepoint-online.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,10 @@ This cmdlet is not currently active in production and may be removed in the futu
540540

541541
{{Manually Enter Set-SPOOrgAssetsLibrary Description Here}}
542542

543+
### [Set-SPORestrictedSiteCreation](Set-SPORestrictedSiteCreation.md)
544+
545+
{{Sets or updates one or more group configurations for restricting site creation}}
546+
543547
### [Set-SPOSite](Set-SPOSite.md)
544548

545549
{{Manually Enter Set-SPOSite Description Here}}

0 commit comments

Comments
 (0)