Retrieves all or a specific site policy
Get-PnPSitePolicy [-AllAvailable [<SwitchParameter>]]
[-Name <String>]
[-Web <WebPipeBind>]
OfficeDevPnP.Core.Entities.SitePolicyEntity
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. |
PS:> Get-PnPSitePolicy
Retrieves the current applied site policy.
PS:> Get-PnPSitePolicy -AllAvailable
Retrieves all available site policies.
PS:> Get-PnPSitePolicy -Name "Contoso HBI"
Retrieves an available site policy with the name "Contoso HBI".