Set-PnPTenantSite

Set site information.

Syntax

Set-PnPTenantSite
   -Url <String>
                    [-Title <String>]
                    [-LocaleId <UInt32>]
                    [-AllowSelfServiceUpgrade [<SwitchParameter>]]
                    [-Owners <String>]
                    [-DenyAddAndCustomizePages [<SwitchParameter>]]
                    [-SharingCapability <SharingCapabilities>]
                    [-StorageMaximumLevel <Int>]
                    [-StorageWarningLevel <Int>]
                    [-DefaultLinkPermission <SharingPermissionType>]
                    [-DefaultSharingLinkType <SharingLinkType>]
                    [-SharingAllowedDomainList <String>]
                    [-SharingBlockedDomainList <String>]
                    [-BlockDownloadOfNonViewableFiles [<SwitchParameter>]]
                    [-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
                    [-CommentsOnSitePagesDisabled [<SwitchParameter>]]
                    [-DisableAppViews <AppViewsPolicy>]
                    [-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>]
                    [-DisableFlows <FlowsPolicy>]
                    [-Wait [<SwitchParameter>]]
                    [-Connection <SPOnlineConnection>]
Set-PnPTenantSite
   -Url <String>
                    [-LockState <SiteLockState>]
                    [-Wait [<SwitchParameter>]]
                    [-Connection <SPOnlineConnection>]

Description

Sets site properties for existing sites.

Examples

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

Set-PnPTenantSite -Url https://contoso.sharepoint.com -Title "Contoso Website" -Sharing Disabled

This will set the title of the site collection with the URL 'https://contoso.sharepoint.com' to 'Contoso Website' and disable sharing on this site collection.

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

Set-PnPTenantSite -Url https://contoso.sharepoint.com -Title "Contoso Website" -StorageWarningLevel 8000 -StorageMaximumLevel 10000

This will set the title of the site collection with the URL 'https://contoso.sharepoint.com' to 'Contoso Website', set the storage warning level to 8GB and set the storage maximum level to 10GB.

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

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -Owners "user@contoso.onmicrosoft.com"

This will add user@contoso.onmicrosoft.com as an additional site collection owner at 'https://contoso.sharepoint.com/sites/sales'.

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

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -Owners @("user1@contoso.onmicrosoft.com", "user2@contoso.onmicrosoft.com")

This will add user1@contoso.onmicrosoft.com and user2@contoso.onmicrosoft.com as additional site collection owners at 'https://contoso.sharepoint.com/sites/sales'.

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

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -NoScriptSite:$false

This will enable script support for the site 'https://contoso.sharepoint.com/sites/sales' if disabled.

Parameters

-AllowSelfServiceUpgrade

Specifies if the site administrator can upgrade the site collection

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-BlockDownloadOfNonViewableFiles

Specifies if non web viewable files can be downloaded.

Only applicable to: SharePoint Online

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-CommentsOnSitePagesDisabled

Specifies if comments on site pages are enabled

Only applicable to: SharePoint Online

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DefaultLinkPermission

Specifies the default link permission for the site collection. None - Respect the organization default link permission. View - Sets the default link permission for the site to "view" permissions. Edit - Sets the default link permission for the site to "edit" permissions

Only applicable to: SharePoint Online

Type:SharingPermissionType
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DefaultSharingLinkType

Specifies the default link type for the site collection. None - Respect the organization default sharing link type. AnonymousAccess - Sets the default sharing link for this site to an Anonymous Access or Anyone link. Internal - Sets the default sharing link for this site to the "organization" link or company shareable link. Direct - Sets the default sharing link for this site to the "Specific people" link

Only applicable to: SharePoint Online

Type:SharingLinkType
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-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:SwitchParameter
Aliases:NoScriptSite
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DisableAppViews

Only applicable to: SharePoint Online

Type:AppViewsPolicy
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DisableCompanyWideSharingLinks

Only applicable to: SharePoint Online

Type:CompanyWideSharingLinksPolicy
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DisableFlows

Only applicable to: SharePoint Online

Type:FlowsPolicy
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-LocaleId

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

Type:UInt32
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-LockState

Sets the lockstate of a site

Only applicable to: SharePoint Online

Type:SiteLockState
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Owners

Specifies owner(s) to add as site collection administrators. They will be added as additional site collection administrators. Existing administrators will stay. Can be both users and groups.

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-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".

Only applicable to: SharePoint Online

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SharingBlockedDomainList

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

Only applicable to: SharePoint Online

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SharingCapability

Specifies what the sharing capabilities are for the site. Possible values: Disabled, ExternalUserSharingOnly, ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly

Only applicable to: SharePoint Online

Type:SharingCapabilities
Aliases:Sharing
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SharingDomainRestrictionMode

Specifies the external sharing mode for domains.

Only applicable to: SharePoint Online

Type:SharingDomainRestrictionModes
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-StorageMaximumLevel

Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's available quota.

Only applicable to: SharePoint Online

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-StorageWarningLevel

Specifies the warning level for the storage quota in megabytes. This value must not exceed the values set for the StorageMaximumLevel parameter

Only applicable to: SharePoint Online

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Title

Specifies the title of the site

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Url

Specifies the URL of the site

Type:String
Position:0
Accept pipeline input:True
Accept wildcard characters:False
-Wait

Wait for the operation to complete

Only applicable to: SharePoint Online

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False