Set-PnPDocumentSetField

Sets a site column from the available content types to a document set

Syntax

Set-PnPDocumentSetField
   -DocumentSet <DocumentSetPipeBind>
                          -Field <FieldPipeBind>
                          [-SetSharedField [<SwitchParameter>]]
                          [-SetWelcomePageField [<SwitchParameter>]]
                          [-RemoveSharedField [<SwitchParameter>]]
                          [-RemoveWelcomePageField [<SwitchParameter>]]
                          [-Web <WebPipeBind>]
                          [-Connection <SPOnlineConnection>]

Examples

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

Set-PnPDocumentSetField -Field "Test Field" -DocumentSet "Test Document Set" -SetSharedField -SetWelcomePageField

This will set the field, available in one of the available content types, as a Shared Field and as a Welcome Page Field.

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

Set-PnPDocumentSetField -Field "Test Field" -DocumentSet "Test Document Set" -RemoveSharedField -RemoveWelcomePageField

This will remove the field, available in one of the available content types, as a Shared Field and as a Welcome Page Field.

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:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-DocumentSet

The document set in which to set the field. Either specify a name, a document set template object, an id, or a content type object

Type:DocumentSetPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Field

The field to set. The field needs to be available in one of the available content types. Either specify a name, an id or a field object

Type:FieldPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-RemoveSharedField

Removes the field as a Shared Field

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-RemoveWelcomePageField

Removes the field as a Welcome Page Field

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SetSharedField

Set the field as a Shared Field

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SetWelcomePageField

Set the field as a Welcome Page field

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters: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
Position:Named
Accept pipeline input:False
Accept wildcard characters:False