Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish main to live, 12/09/24, 3:30 PM PT #773

Merged
merged 21 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
external help file: sharepointonline.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-sporestrictedsitecreation
applicable: SharePoint Online
title: Get-SPORestrictedSiteCreation
schema: 2.0.0
author: vgaddam-pm
ms.author: vgaddam
ms.reviewer:
---

# Get-SPORestrictedSiteCreation

## SYNOPSIS

This cmdlet allows SharePoint administrators to check the current configuration of the restricted site creation feature.

## SYNTAX

```powershell
Get-SPORestrictedSiteCreation [-SiteType <RestrictedSiteCreationSiteType>]
```

## DESCRIPTION

This cmdlet obtains the current configuration information for the restricted site creation feature, including whether it is enabled, the current mode, and the current policies.

> [!Important]
>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.

## EXAMPLES

### Example 1

```powershell
Get-SPORestrictedSiteCreation
```

Example 1 returns all configuration information for the restricted site creation feature. This includes whether the feature is enabled, the current mode (deny or allow), and the Microsoft Entra security groups configured for each site type.

### Example 2

```powershell
Get-SPORestrictedSiteCreation –SiteType Communication
```

Example 2 returns a comma-separated list of the IDs of the Microsoft Entra security groups configured for the `Communication` site type. Depending on whether restricted site creation is in allow or deny mode, members of these groups are either allowed or denied from creating SharePoint communication sites.

## PARAMETERS

### -SiteType
When provided, only return the Microsoft Entra security groups configured for the specified site type.

PARAMVALUE: All | SharePoint | OneDrive | Team | Communication
• All - OneDrive and all SharePoint sites
• SharePoint - All SharePoint sites (but not OneDrive)
• OneDrive - Only OneDrive
• Team - Only SharePoint team sites (group-connected and classic)
• Communication - Only SharePoint communication sites

```yaml
Type: RestrictedSiteCreationSiteType
Parameter Sets: (All)
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)

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).
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
external help file: sharepointonline.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/set-sporestrictedsitecreation
applicable: SharePoint Online
title: Set-SPORestrictedSiteCreation
schema: 2.0.0
author: vgaddam-pm
ms.author: vgaddam
ms.reviewer: jmcdowe
---

# Set-SPORestrictedSiteCreation

## SYNOPSIS

Sets or updates one or more group configurations for restricting site creation.

## SYNTAX

### ParamSet1

```powershell
Set-SPORestrictedSiteCreation
[-Enabled <Boolean>]
[-Mode <RestrictedSiteCreationMode>]
[-SiteType <RestrictedSiteCreationSiteType>]
[-RestrictedSiteCreationGroups <String>]
```

## DESCRIPTION

This cmdlet sets or updates the configuration or setting for the Restricted Site Creation feature.

> [!Important]
> 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.

## EXAMPLES

### Example 1

```powershell
Set-SPORestrictedSiteCreation –Enabled:$true
```

Example 1 enables the restricted site creation feature for the tenant.

### Example 2

```powershell
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

```powershell
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

```powershell
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

```powershell
Set-SPORestrictedSiteCreation –SiteType "OneDrive" -RestrictedSiteCreationGroups ""
```

Example 5 clears the policy for the `OneDrive` site type so that it no longer applies to any users.

## PARAMETERS

### -Enabled

PARAMVALUE: true | false
Enables or disables Restricted Site Creation feature in tenant.

```yaml
Type: Boolean
Parameter Sets: ParamSet1
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Mode

Specifies whether policies allow or deny users from creating sites.
PARAMVALUE: Deny | Allow
• Deny – a user will be blocked from creating a site if any policy applies to them.
• Allow – a user will only be allowed to create a site if a policy applies to them.

> [!NOTE]
> 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.

```yaml
Type: RestrictedSiteCreationMode
Parameter Sets: ParamSet1
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SiteType

When paired with the `–RestrictedSiteCreationGroups` parameter, creates a new policy which applies to the specified types of sites.

PARAMVALUE: All | SharePoint | OneDrive | Team | Communication
• All - OneDrive and all SharePoint sites
• SharePoint - All SharePoint sites (but not OneDrive)
• OneDrive - Only OneDrive
• Team - Only SharePoint team sites (group-connected and classic)
• Communication - Only SharePoint communication sites


```yaml
Type: RestrictedSiteCreationSiteType
Parameter Sets: ParamSet1
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -RestrictedSiteCreationGroups

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.
Set to the empty string ("") to clear the policy for a site type.

```yaml
Type: String
Parameter Sets: (All)
Aliases: cf
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

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).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

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).

[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)

[Set-SPORestrictedSiteCreation](Set-SPORestrictedSiteCreation.md)
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ The following cmdlet references are for SharePoint Online.

{{Manually Enter Get-SPOPublicCdnOrigins Description Here}}

### [Get-SPORestrictedSiteCreation](Get-SPORestrictedSiteCreation.md)

{{Gets group configurations for restricting site creation policy}}

### [Get-SPOSite](Get-SPOSite.md)

{{Manually Enter Get-SPOSite Description Here}}
Expand Down Expand Up @@ -540,6 +544,10 @@ This cmdlet is not currently active in production and may be removed in the futu

{{Manually Enter Set-SPOOrgAssetsLibrary Description Here}}

### [Set-SPORestrictedSiteCreation](Set-SPORestrictedSiteCreation.md)

{{Sets or updates one or more group configurations for restricting site creation}}

### [Set-SPOSite](Set-SPOSite.md)

{{Manually Enter Set-SPOSite Description Here}}
Expand Down
Loading