Set-PnPSitePolicy

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPSitePolicy.md to change this file.

Sets a site policy

Syntax

Set-PnPSitePolicy
   -Name <String>
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Examples

EXAMPLE 1

Set-PnPSitePolicy -Name "Contoso HBI"

This applies a site policy with the name "Contoso HBI" to the current site. The policy needs to be available in the site.

Parameters

-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:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the site policy to apply

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False