Skip to content

Commit d3bd9b5

Browse files
authored
Create Set-SPORestrictedSiteCreation.md
New Cmdlet for new RSC feature releasing at Ignite
1 parent 36f68e8 commit d3bd9b5

File tree

1 file changed

+178
-0
lines changed

1 file changed

+178
-0
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
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-SPOSite
7+
schema: 2.0.0
8+
author: vaibhav-gaddam
9+
ms.author: vgaddam
10+
ms.reviewer:
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+
The Set-SPORestrictedSiteCreation cmdlet sets or updates the configuration or setting for the Restricted Site Creation feature.
34+
35+
You must be a SharePoint Online administrator to run the cmdlet.
36+
37+
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at [Intro to SharePoint Online Management Shell](https://learn.microsoft.com/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell?view=sharepoint-ps).
38+
39+
> [!Important]
40+
> You must use version 16.0.25513 (published November 2024) or later of the [SharePoint Online Management Shell](https://www.microsoft.com/en-us/download/details.aspx?id=35588) for these commands to function properly. Earlier versions do not have the current list of site types and will not operate correctly.
41+
42+
## EXAMPLES
43+
44+
### Example 1
45+
46+
```powershell
47+
Set-SPORestrictedSiteCreation –Enabled:$true
48+
```
49+
50+
Example 1`enables the restricted site creation feature for the tenant.
51+
52+
### Example 2
53+
54+
```powershell
55+
Set-SPORestrictedSiteCreation –Mode Allow
56+
```
57+
58+
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.
59+
60+
### Example 3
61+
62+
```powershell
63+
Set-SPORestrictedSiteCreation –SiteType "All" -RestrictedSiteCreationGroups "281e395b-7316-4cb2-b5bb-8881426ee411"
64+
```
65+
66+
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.
67+
68+
### Example 4
69+
70+
```powershell
71+
Set-SPORestrictedSiteCreation –SiteType "Team" -RestrictedSiteCreationGroups "78159241-04a9-41d2-8dd4-ac568e9766a3,1f95829b-e1c8-4406-b2be-508c36f4bca5"
72+
```
73+
74+
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.
75+
### Example 5
76+
77+
```powershell
78+
Set-SPORestrictedSiteCreation –SiteType "OneDrive" -RestrictedSiteCreationGroups "" ```
79+
80+
Example 5 clears the policy for the `OneDrive` site type so that it no longer applies to any users.
81+
82+
## PARAMETERS
83+
84+
### -Enabled
85+
86+
PARAMVALUE: true | false
87+
Enables of disabled Restricted Site Creation feature in tenant
88+
89+
```yaml
90+
Type: Boolean
91+
Parameter Sets: ParamSet1
92+
Aliases:
93+
Applicable: SharePoint Online
94+
Required: False
95+
Position: Named
96+
Default value: None
97+
Accept pipeline input: False
98+
Accept wildcard characters: False
99+
```
100+
101+
### -Mode
102+
103+
Specifies whether policies allow or deny users from creating sites.
104+
PARAMVALUE: Deny | Allow
105+
• Deny – a user will be blocked from creating a site if any policy applies to them.
106+
• Allow – a user will only be allowed to create a site if a policy applies to them.
107+
108+
> [!NOTE]
109+
> 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.
110+
111+
```yaml
112+
Type: RestrictedSiteCreationMode
113+
Parameter Sets: ParamSet1
114+
Aliases:
115+
Applicable: SharePoint Online
116+
Required: False
117+
Position: Named
118+
Default value: None
119+
Accept pipeline input: False
120+
Accept wildcard characters: False
121+
```
122+
123+
### -SiteType
124+
125+
When paired with the –RestrictedSiteCreationGroups parameter, creates a new policy which applies to the specified types of sites.
126+
127+
PARAMVALUE: All | SharePoint | OneDrive | Team | Communication
128+
• All - OneDrive and all SharePoint sites
129+
• SharePoint - All SharePoint sites (but not OneDrive)
130+
• OneDrive - Only OneDrive
131+
• Team - Only SharePoint team sites (group-connected and classic)
132+
• Communication - Only SharePoint communication sites
133+
134+
135+
```yaml
136+
Type: RestrictedSiteCreationSiteType
137+
Parameter Sets: ParamSet1
138+
Aliases:
139+
Applicable: SharePoint Online
140+
Required: False
141+
Position: Named
142+
Default value: None
143+
Accept pipeline input: False
144+
Accept wildcard characters: False
145+
```
146+
147+
### -RestrictedSiteCreationGroups
148+
149+
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.
150+
Set to the empty string ("") to clear the policy for a site type.
151+
152+
```yaml
153+
Type: String
154+
Parameter Sets: (All)
155+
Aliases: cf
156+
Applicable: SharePoint Online
157+
Required: False
158+
Position: Named
159+
Default value: None
160+
Accept pipeline input: False
161+
Accept wildcard characters: False
162+
```
163+
164+
### CommonParameters
165+
166+
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).
167+
168+
## INPUTS
169+
170+
## OUTPUTS
171+
172+
## NOTES
173+
174+
## RELATED LINKS
175+
176+
[Getting started with SharePoint Online Management Shell](https://learn.microsoft.com/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps)
177+
178+
[Set-SPORestrictedSiteCreation](Set-SPORestrictedSiteCreation.md)

0 commit comments

Comments
 (0)