Set-SPOSite

 

Applies to: Office 365, SharePoint Online

Topic Last Modified: 2017-07-05

Sets or updates one or more properties' values for a site collection.

Set-SPOSite [-AllowSelfServiceUpgrade <$true | $false>] [-DenyAddAndCustomizePages <$true | $false>] [-DisableAppViews <Unknown | Disabled | NotDisabled>] [-DisableCompanyWideSharingLinks <Unknown | Disabled | NotDisabled>] [-DisableFlows <Unknown | Disabled | NotDisabled>] [-LocaleId <UInt32>] [-LockState <String>] [-NoWait <SwitchParameter>] [-Owner <String>] [-ResourceQuota <Double>] [-ResourceQuotaWarningLevel <Double>] [-SandboxedCodeActivationCapability <Unknown | Check | Disabled | Enabled>] [-SharingAllowedDomainList <String>] [-SharingBlockedDomainList <String>] [-SharingCapability <Disabled | ExternalUserSharingOnly | ExternalUserAndGuestSharing | ExistingExternalUserSharingOnly>] [-SharingDomainRestrictionMode <None | AllowList | BlockList>] [-ShowPeoplePickerSuggestionsForGuestUsers <$true | $false>] [-StorageQuota <Int64>] [-StorageQuotaReset <SwitchParameter>] [-StorageQuotaWarningLevel <Int64>] [-Title <String>] <COMMON PARAMETERS>

Set-SPOSite -EnablePWA <$true | $false> <COMMON PARAMETERS>

Set-SPOSite [-DisableSharingForNonOwners <SwitchParameter>] <COMMON PARAMETERS>

Set-SPOSite [-NewUrl <String>] <COMMON PARAMETERS>

COMMON PARAMETERS: -Identity <SpoSitePipeBind> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

--------EXAMPLE 1--------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -Owner joe.healy@contoso.com -NoWait

Example 1 updates the owner of site collection https://contoso.sharepoint.com/sites/site1 to the person whose email address is joe.healy@contoso.com. This cmdlet is executed immediately without delay.

--------EXAMPLE 2--------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -ResourceQuota 0 -StorageQuota 15000

Example 2 updates the settings of site collection https://contoso.sharepoint.com/sites/site1. The storage quota is updated to 15000 megabytes and the resource quota is updated to 0 megabytes.

--------EXAMPLE 3--------

Set-SPOSite -Identity https://contoso.sharepoint.com -StorageQuota 3000 -StorageQuotaWarningLevel 2000

This example updates the settings of site collection https://contoso.sharepoint.com. The storage quota is updated to 3000 megabytes and the storage quota warning level is updated to 2000 megabytes.

--------EXAMPLE 4--------

Set-SPOSite -Identity https://contoso.sharepoint.com -DisableSharingForNonOwners

Example 4 prevents non-owners of a site from inviting new users to the site.

--------EXAMPLE 5--------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/groupname -StorageQuota 3000 -StorageQuotaWarningLevel 2000

This example sets the quota for the site.

NoteNote:
If Site Collection Storage Management is enabled for the tenant, you will not be able to set quota and will have a generic error returned. To workaround this issue, set the site collection storage management to "manual" temporarily, set your quotas, and then set the site collection storage management setting back to its original setting.

For any parameters that are passed in, the Set-SPOSite cmdlet sets or updates the setting for the site collection identified by parameter Identity.

You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

SharePoint Online Management Shell

 

Parameter Required Type Description

EnablePWA

Required

System.Boolean

Determines whether site can include Project Web App. For more information about Project Web App ,see Plan SharePoint groups in Project Server 2013.

Identity

Required

Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind

Specifies the URL of the site collection to update.

AllowSelfServiceUpgrade

Optional

System.Boolean

Determines whether site collection administrators can upgrade their site collections.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

DenyAddAndCustomizePages

Optional

System.Boolean

Determines whether the Add And Customize Pages right is denied on the site collection. For more information about permission levels, see User permissions and permission levels in SharePoint 2013.

DisableAppViews

Optional

Microsoft.Online.SharePoint.TenantAdministration.AppViewsPolicy

PARAMVALUE: Unknown | Disabled | NotDisabled

DisableCompanyWideSharingLinks

Optional

Microsoft.Online.SharePoint.TenantAdministration.CompanyWideSharingLinksPolicy

PARAMVALUE: Unknown | Disabled | NotDisabled

DisableFlows

Optional

Microsoft.Online.SharePoint.TenantAdministration.FlowsPolicy

PARAMVALUE: Unknown | Disabled | NotDisabled

DisableSharingForNonOwners

Optional

System.Management.Automation.SwitchParameter

This parameter prevents non-owners from invited new users to the site.

NoteNote:
This parameter is available only in SharePoint Online Management Shell Version 16.0.4613.1211 or later.

LocaleId

Optional

System.UInt32

Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft (https://go.microsoft.com/fwlink/p/?LinkId=242911).

LockState

Optional

System.String

Sets the lock state on a site. Valid values are: NoAccess and Unlock. When the lock state of a site is NoAccess, all traffic to the site will be blocked. If parameter NoAccessRedirectUrl in the Set-SPOTenant cmdlet is set, traffic to sites that have a lock state NoAccess will be redirected to that URL. If parameter NoAccessRedirectUrl is not set, a 403 error will be returned.

NewUrl

Optional

System.String

PARAMVALUE: String

NoWait

Optional

System.Management.Automation.SwitchParameter

Specifies to continue executing script immediately.

Owner

Optional

System.String

Specifies the owner of the site collection.

ResourceQuota

Optional

System.Double

Specifies the resource quota in megabytes of the site collection. The default value is 0. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010 (https://msdn.microsoft.com/en-us/library/gg615462.aspx).

ResourceQuotaWarningLevel

Optional

System.Double

Specifies the warning level in megabytes of the site collection to warn the site collection administrator that the site is approaching the resource quota.

SandboxedCodeActivationCapability

Optional

Microsoft.Online.SharePoint.TenantAdministration.SandboxedCodeActivationCapabilities

This parameter has been deprecated. Changing values for this parameter has no effect on the tenant as code-based Sandbox solutions have been removed in SharePoint Online.

For more information, see Removing Code-Based Sandbox Solutions in SharePoint Online

SharingAllowedDomainList

Optional

System.String

Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character as the delimiter for entering multiple values. For example, “contoso.com fabrikam.com”.

For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365 SharePoint Online and OneDrive for Business

SharingBlockedDomainList

Optional

System.String

Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space character as the delimiter for entering multiple values. For example, “contoso.com fabrikam.com”.

For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365 SharePoint Online and OneDrive for Business

SharingCapability

Optional

Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities

Determines what level of sharing is available for the site. The possible values are: Disabled – external user sharing (share by email) and guest link sharing are both disabled, ExternalUserSharingOnly – external user sharing (share by email) is enabled, but guest link sharing is disabled, or ExternalUserAndGuestSharing - external user sharing (share by email) and guest link sharing are both enabled.

For more information about sharing, see . Manage external sharing for your SharePoint online environment.

SharingDomainRestrictionMode

Optional

Microsoft.Online.SharePoint.TenantManagement.SharingDomainRestrictionModes

Specifies the external sharing mode for domains.

The following values are:

  • None

  • AllowList

  • BlockList

For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365 SharePoint Online and OneDrive for Business

ShowPeoplePickerSuggestionsForGuestUsers

Optional

System.Boolean

PARAMVALUE: $true | $false

StorageQuota

Optional

System.Int64

Specifies the storage quota in megabytes of the site collection.

StorageQuotaReset

Optional

System.Management.Automation.SwitchParameter

Resets the OneDrive for Business storage quota to the tenant’s specified default level (if it exists) or 1 terabyoe (TB).

StorageQuotaWarningLevel

Optional

System.Int64

Specifies the warning level in megabytes of the site collection to warn the site collection administrator that the site is approaching the storage quota.

Title

Optional

System.String

Specifies the title of the site collection.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Show: