Set-PnPSiteClosure

Tip

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

Opens or closes a site which has a site policy applied

Syntax

Set-PnPSiteClosure
   -State <ClosureState>
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Examples

EXAMPLE 1

Set-PnPSiteClosure -State Open

This opens a site which has been closed and has a site policy applied.

EXAMPLE 2

Set-PnPSiteClosure -State Closed

This closes a site which is open and has a site policy applied.

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

The state of the site

Type:ClosureState
Accepted values:Open, Closed
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False