Set-PnPSite

Sets Site Collection properties.

Syntax

Set-PnPSite
   [-Classification <String>]
              [-DisableFlows [<SwitchParameter>]]
              [-LogoFilePath <String>]
              [-Sharing <SharingCapabilities>]
              [-StorageMaximumLevel <Int>]
              [-StorageWarningLevel <Int>]
              [-AllowSelfServiceUpgrade [<SwitchParameter>]]
              [-NoScriptSite [<SwitchParameter>]]
              [-Owners <String>]
              [-CommentsOnSitePagesDisabled [<SwitchParameter>]]
              [-DefaultLinkPermission <SharingPermissionType>]
              [-DefaultSharingLinkType <SharingLinkType>]
              [-DisableAppViews <AppViewsPolicy>]
              [-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>]
              [-DisableSharingForNonOwners [<SwitchParameter>]]
              [-LocaleId <UInt32>]
              [-NewUrl <String>]
              [-RestrictedToGeo <RestrictedToRegion>]
              [-SocialBarOnSitePagesDisabled [<SwitchParameter>]]
              [-Identity <String>]
              [-Connection <SPOnlineConnection>]
Set-PnPSite
   [-LockState <SiteLockState>]
              [-Wait [<SwitchParameter>]]
              [-Identity <String>]
              [-Connection <SPOnlineConnection>]

Examples

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

Set-PnPSite -Classification "HBI"

Sets the current site classification to HBI

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

Set-PnPSite -Classification $null

Unsets the current site classification

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

Set-PnPSite -DisableFlows

Disables Flows for this site

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

Set-PnPSite -DisableFlows:$false

Enables Flows for this site

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

Set-PnPSite -SiteLogoPath c:\images\mylogo.png

Sets the logo if the site is a modern team site

Parameters

-AllowSelfServiceUpgrade

Specifies if the site administrator can upgrade the site collection

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

The classification to set

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

Specifies if comments on site pages are enabled or disabled

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
-DisableAppViews
Type:AppViewsPolicy
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DisableCompanyWideSharingLinks
Type:CompanyWideSharingLinksPolicy
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DisableFlows

Disables flows for this site

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

Specifies to prevent non-owners from inviting new users to the site

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity
Type:String
Aliases:Url
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-LocaleId

Specifies the language of this site collection.

Type:UInt32
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
-LogoFilePath

Sets the logo if the site is modern team site. If you want to set the logo for a classic site, use Set-PnPWeb -SiteLogoUrl

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

Specifies the language of this site collection.

Type:String
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
Aliases:DenyAndAddCustomizePages
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
-RestrictedToGeo

Specifies the Geo/Region restrictions of this site.

Type:RestrictedToRegion
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
-SocialBarOnSitePagesDisabled

Disables or enables the Social Bar for Site Collection.

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

Wait for the operation to complete

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