次の方法で共有


Set-SPORestrictedSiteCreation

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

構文

Default (既定)

Set-SPORestrictedSiteCreation
    [-Enabled <Boolean>]
    [-Mode <RestrictedSiteCreationMode>]
    [-SiteType <RestrictedSiteCreationSiteType>]
    [-RestrictedSiteCreationGroups <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

説明

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 for these commands to function properly. Earlier versions do not have the current list of site types and will not operate correctly.

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.

パラメーター

-Confirm

Prompts you for confirmation before running the cmdlet.

パラメーターのプロパティ

型:System.Management.Automation.SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:cf

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Enabled

Applicable: SharePoint Online

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

パラメーターのプロパティ

型:System.Boolean
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Mode

Applicable: SharePoint Online

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.

パラメーターのプロパティ

型:Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationMode
規定値:None
指定可能な値:Deny, Allow
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-RestrictedSiteCreationGroups

Applicable: SharePoint Online

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.

パラメーターのプロパティ

型:System.String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-SiteType

Applicable: SharePoint Online

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

パラメーターのプロパティ

型:Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationSiteType
規定値:None
指定可能な値:All, SharePoint, OneDrive, Team, Communication
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

パラメーターのプロパティ

型:System.Management.Automation.SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:wi

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

入力

None

出力

System.Object