Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 961 Bytes

GetPnPSitePolicy.md

File metadata and controls

38 lines (32 loc) · 961 Bytes

Get-PnPSitePolicy

Retrieves all or a specific site policy

Syntax

Get-PnPSitePolicy [-AllAvailable [<SwitchParameter>]]
                  [-Name <String>]
                  [-Web <WebPipeBind>]

Returns

OfficeDevPnP.Core.Entities.SitePolicyEntity

Parameters

Parameter Type Required Description
AllAvailable SwitchParameter False Retrieve all available site policies
Name String False Retrieves a site policy with a specific name
Web WebPipeBind False The web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Get-PnPSitePolicy

Retrieves the current applied site policy.

Example 2

PS:> Get-PnPSitePolicy -AllAvailable

Retrieves all available site policies.

Example 3

PS:> Get-PnPSitePolicy -Name "Contoso HBI"

Retrieves an available site policy with the name "Contoso HBI".