Set-PnPField
SYNOPSIS
Changes one or more properties of a field in a specific list or for the whole site
SYNTAX
Set-PnPField [-List <ListPipeBind>] [-Identity <FieldPipeBind>] [-Values <Hashtable>] [-ShowInFiltersPane <ShowInFiltersPaneStatus>] [-UpdateExistingLists] [-Connection <PnPConnection>]
DESCRIPTION
Allows to modify a field in a specific list or for the whole site.
EXAMPLES
EXAMPLE 1
Set-PnPField -Identity AssignedTo -Values @{JSLink="customrendering.js";Group="My fields"}
Updates the AssignedTo field on the current web to use customrendering.js for the JSLink and sets the group name the field is categorized in to "My Fields". Lists that are already using the AssignedTo field will not be updated.
EXAMPLE 2
Set-PnPField -Identity AssignedTo -Values @{JSLink="customrendering.js";Group="My fields"} -UpdateExistingLists
Updates the AssignedTo field on the current web to use customrendering.js for the JSLink and sets the group name the field is categorized in to "My Fields". Lists that are already using the AssignedTo field will also be updated.
EXAMPLE 3
Set-PnPField -List "Tasks" -Identity "AssignedTo" -Values @{JSLink="customrendering.js"}
Updates the AssignedTo field on the Tasks list to use customrendering.js for the JSLink
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
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The field object, internal field name (case sensitive) or field id to update
Type: FieldPipeBind
Parameter Sets: (All)
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-List
The list object, name or id where to update the field. If omitted the field will be updated on the web.
Type: ListPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-UpdateExistingLists
If provided, the field will be updated on existing lists that use it as well. If not provided or set to $false, existing lists using the field will remain unchanged but new lists will get the updated field.
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Values
Hashtable of properties to update on the field. Use the syntax @{property1="value";property2="value"}.
Type: Hashtable
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ShowInFiltersPane
Allows configuring a field to either always be shown (Pinned), never be shown (Removed) or have SharePoint define if it should be shown (Auto = default).
Type: Commands.Enums.ShowInFiltersPaneStatus
Parameter Sets: (All)
Accepted values: Auto, Removed, Pinned
Required: False
Position: Named
Default value: Auto
Accept pipeline input: False
Accept wildcard characters: False