Skip to content

Latest commit

 

History

History
226 lines (170 loc) · 4.77 KB

Set-PnPList.md

File metadata and controls

226 lines (170 loc) · 4.77 KB
external help file applicable schema
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
2.0.0

Set-PnPList

SYNOPSIS

Updates list settings

SYNTAX

Set-PnPList -Identity <ListPipeBind>
            [-EnableContentTypes <Boolean>]
            [-BreakRoleInheritance [<SwitchParameter>]]
            [-CopyRoleAssignments [<SwitchParameter>]]
            [-ClearSubscopes [<SwitchParameter>]]
            [-Title <String>]
            [-Hidden <Boolean>]
            [-EnableVersioning <Boolean>]
            [-EnableMinorVersions <Boolean>]
            [-MajorVersions <UInt32>]
            [-MinorVersions <UInt32>]
            [-Web <WebPipeBind>]
            [-Connection <SPOnlineConnection>]

EXAMPLES

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

Set-PnPList -Identity "Demo List" -EnableContentTypes $true

Switches the Enable Content Type switch on the list

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

Set-PnPList -Identity "Demo List" -Hidden $true

Hides the list from the SharePoint UI.

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

Set-PnPList -Identity "Demo List" -EnableVersioning $true

Turns on major versions on a list

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

Set-PnPList -Identity "Demo List" -EnableVersioning $true -MajorVersions 20

Turns on major versions on a list and sets the maximum number of Major Versions to keep to 20.

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

Set-PnPList -Identity "Demo Library" -EnableVersioning $true -EnableMinorVersions $true -MajorVersions 20 -MinorVersions 5

Turns on major versions on a document library and sets the maximum number of Major versions to keep to 20 and sets the maximum of Minor versions to 5.

PARAMETERS

-BreakRoleInheritance

If used the security inheritance is broken for this list

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-ClearSubscopes

If used the unique permissions are cleared from child objects and they can inherit role assignments from this object

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-CopyRoleAssignments

If used the roles are copied from the parent web

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-EnableContentTypes

Set to $true to enable content types, set to $false to disable content types

Type: Boolean
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-EnableMinorVersions

Enable or disable minor versions versioning. Set to $true to enable, $false to disable.

Type: Boolean
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-EnableVersioning

Enable or disable versioning. Set to $true to enable, $false to disable.

Type: Boolean
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Hidden

Hide the list from the SharePoint UI. Set to $true to hide, $false to show.

Type: Boolean
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Identity

The ID, Title or Url of the list.

Type: ListPipeBind
Parameter Sets: (All)

Required: True
Position: Named
Accept pipeline input: False

-MajorVersions

Maximum major versions to keep

Type: UInt32
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-MinorVersions

Maximum minor versions to keep

Type: UInt32
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Title

The title of the list

Type: String
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Connection

Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

RELATED LINKS

SharePoint Developer Patterns and Practices