Set-SPOSite

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

Syntax

Set-SPOSite
   [-Identity] <SpoSitePipeBind>
   -EnablePWA <Boolean>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-SPOSite
   [-Identity] <SpoSitePipeBind>
   [-AllowSelfServiceUpgrade <Boolean>]
   [-Confirm]
   [-DenyAddAndCustomizePages <Boolean>]
   [-LocaleId <UInt32>]
   [-LockState <String>]
   [-NoWait]
   [-Owner <String>]
   [-ResourceQuota <Double>]
   [-ResourceQuotaWarningLevel <Double>]
   [-SandboxedCodeActivationCapability <SandboxedCodeActivationCapabilities>]
   [-SharingCapability <SharingCapabilities>]
   [-StorageQuota <Int64>]
   [-StorageQuotaWarningLevel <Int64>]
   [-Title <String>]
   [-WhatIf]
   [-AllowLimitedAccess <Boolean>]
   [-BlockDownloadOfNonViewableFiles <Boolean>]
   [-CommentsOnSitePagesDisabled <Boolean>]
   [-DisableAppViews <AppViewsPolicy>]
   [-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>]
   [-DisableFlows <FlowsPolicy>]
   [-RestrictedToGeo <RestrictedToRegion>]
   [-SharingAllowedDomainList <String>]
   [-SharingBlockedDomainList <String>]
   [-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
   [-ShowPeoplePickerSuggestionsForGuestUsers <Boolean>]
   [-StorageQuotaReset]
   [<CommonParameters>]
Set-SPOSite
   [-Identity] <SpoSitePipeBind>
   [-Confirm]
   [-DisableSharingForNonOwners]
   [-WhatIf]
   [<CommonParameters>]
Set-SPOSite
   [-Identity] <SpoSitePipeBind>
   [-Confirm]
   [-WhatIf]
   [-NewUrl <String>]
   [<CommonParameters>]

Description

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.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Examples

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

Note:
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.

Required Parameters

-EnablePWA

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

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Identity

Specifies the URL of the site collection to update.

Type:SpoSitePipeBind
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Online

Optional Parameters

-AllowLimitedAccess

{{Fill AllowLimitedAccess Description}}

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-AllowSelfServiceUpgrade

Determines whether site collection administrators can upgrade their site collections.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-BlockDownloadOfNonViewableFiles

{{Fill BlockDownloadOfNonViewableFiles Description}}

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-CommentsOnSitePagesDisabled

PARAMVALUE: $true | $false

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Confirm

PARAMVALUE: SwitchParameter

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-DenyAddAndCustomizePages

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.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-DisableAppViews

PARAMVALUE: Unknown | Disabled | NotDisabled

Type:AppViewsPolicy
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-DisableCompanyWideSharingLinks

PARAMVALUE: Unknown | Disabled | NotDisabled

Type:CompanyWideSharingLinksPolicy
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-DisableFlows

PARAMVALUE: Unknown | Disabled | NotDisabled

Type:FlowsPolicy
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-DisableSharingForNonOwners

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

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-LocaleId

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

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-LockState

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-NewUrl

PARAMVALUE: String

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-NoWait

Specifies to continue executing script immediately.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Owner

Specifies the owner of the site collection.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-ResourceQuota

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 (http://msdn.microsoft.com/en-us/library/gg615462.aspx) (http://msdn.microsoft.com/en-us/library/gg615462.aspx).

Type:Double
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-ResourceQuotaWarningLevel

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

Type:Double
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-RestrictedToGeo

PARAMVALUE: NoRestriction | BlockMoveOnly | BlockFull | Unknown

Type:RestrictedToRegion
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SandboxedCodeActivationCapability

PARAMVALUE: Unknown | Check | Disabled | Enabled

Type:SandboxedCodeActivationCapabilities
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SharingAllowedDomainList

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SharingBlockedDomainList

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SharingCapability

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 (http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/manage-external-sharing-for-your-sharepoint-online-environment-HA102849864.aspx).

Type:SharingCapabilities
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SharingDomainRestrictionMode

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.

Type:SharingDomainRestrictionModes
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-ShowPeoplePickerSuggestionsForGuestUsers

PARAMVALUE: $true | $false

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-StorageQuota

Specifies the storage quota in megabytes of the site collection.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-StorageQuotaReset

Resets the OneDrive for Business storage quota to the tenant’s new default storage space.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-StorageQuotaWarningLevel

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

Type:Int64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Title

Specifies the title of the site collection.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-WhatIf

PARAMVALUE: SwitchParameter

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online