Set-PnPTenantSite

Set site information.

Syntax

Set-PnPTenantSite
   -Url <String>
                    [-Title <String>]
                    [-Sharing <SharingCapabilities>]
                    [-StorageMaximumLevel <Int>]
                    [-StorageWarningLevel <Int>]
                    [-UserCodeMaximumLevel <Double>]
                    [-UserCodeWarningLevel <Double>]
                    [-AllowSelfServiceUpgrade [<SwitchParameter>]]
                    [-Owners <String>]
                    [-NoScriptSite [<SwitchParameter>]]
                    [-DefaultLinkPermission <SharingPermissionType>]
                    [-DefaultSharingLinkType <SharingLinkType>]
                    [-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
-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

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

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

Sets the lockstate of a site

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

Specifies if a site allows custom script or not. See https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f for more information.

Type:SwitchParameter
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
-Sharing

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

Type:SharingCapabilities
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.

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

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

Specifies the quota for this site collection in Sandboxed Solutions units. This value must not exceed the company's aggregate available Sandboxed Solutions quota. The default value is 0. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010 : http://msdn.microsoft.com/en-us/library/gg615462.aspx.

Type:Double
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-UserCodeWarningLevel

Specifies the warning level for the resource quota. This value must not exceed the value set for the UserCodeMaximumLevel parameter

Type:Double
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Wait

Wait for the operation to complete

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