SPORestrictedSiteCreationForApps
S’applique à : SharePoint Online
Sets or updates one or more app configurations for restricting site creation.
This cmdlet sets or updates the configuration or setting for the Restricted Site Creation For Apps feature.
Cmdlets disponibles
Paramètres
| Nom | Type | Valeur par défaut | Valeurs acceptées |
|---|---|---|---|
| Enabled | System.Boolean | ||
| Mode | Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationMode | Deny, Allow | |
| RestrictedSiteCreationApps | System.String | ||
| AuditOnly | Boolean | ||
| SiteType | Microsoft.SharePoint.Administration.SPOnlineProvisioning.RestrictedSiteCreationSiteType | All, SharePoint, OneDrive, Team, Communication |
Exemples
Example 1
Set-SPORestrictedSiteCreationForApps –Enabled:$true Example 1 enables the restricted site creation for apps feature for the tenant.
Example 2
Set-SPORestrictedSiteCreationForApps –Mode Allow Example 2 sets restricted site creation for apps to allow mode. In this mode, an app is only able to create a site if that app is in the list specified for a matching site type.
Example 3
Set-SPORestrictedSiteCreationForApps –SiteType "All" -RestrictedSiteCreationApps "281e395b-7316-4cb2-b5bb-8881426ee411" Example 3 updates the policy for the All site type to apply to the app with the app ID 281e395b-7316-4cb2-b5bb-8881426ee411. This app is now either allowed or denied (depending on the current mode) from creating all OneDrive and SharePoint sites.
Example 4
Set-SPORestrictedSiteCreationForApps –SiteType "Team" -RestrictedSiteCreationApps "78159241-04a9-41d2-8dd4-ac568e9766a3,1f95829b-e1c8-4406-b2be-508c36f4bca5" Example 4 updates the policy for the Team site type to apply to the two apps specified. Both apps now either allowed or denied from creating Team sites, depending on the current mode.
Example 5
Set-SPORestrictedSiteCreationForApps –SiteType "OneDrive" -RestrictedSiteCreationApps "" Example 5 clears the policy for the OneDrive site type so that it no longer applies to any apps.