Table of Contents

Set-PnPListRecordDeclaration

SYNOPSIS

Updates record declaration settings of a list.

SYNTAX

Set-PnPListRecordDeclaration -List <ListPipeBind> [-ManualRecordDeclaration <EcmListManualRecordDeclaration>]
 [-AutoRecordDeclaration <Boolean>] [-Connection <PnPConnection>] 

DESCRIPTION

The RecordDeclaration parameter supports 3 values:

  • AlwaysAllowManualDeclaration
  • NeverAllowManualDeclaration
  • UseSiteCollectionDefaults

EXAMPLES

EXAMPLE 1

Set-PnPListRecordDeclaration -List "Documents" -ManualRecordDeclaration NeverAllowManualDeclaration

Sets the manual record declaration to never allow.

EXAMPLE 2

Set-PnPListRecordDeclaration -List "Documents" -AutoRecordDeclaration $true

Turns on auto record declaration for the list.

PARAMETERS

-AutoRecordDeclaration

Turns on or off auto record declaration on the list.

Type: Boolean
Parameter Sets: (All)

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

-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
Parameter Sets: (All)

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

-List

The list to set the manual record declaration settings for. Specify title, list id, or list object.

Type: ListPipeBind
Parameter Sets: (All)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManualRecordDeclaration

Defines the manual record declaration setting for the lists.

Type: EcmListManualRecordDeclaration
Parameter Sets: (All)
Accepted values: UseSiteCollectionDefaults, AlwaysAllowManualDeclaration, NeverAllowManualDeclaration

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

Microsoft 365 Patterns and Practices