Skip to content

Latest commit

 

History

History
234 lines (179 loc) · 5.01 KB

Add-PnPTaxonomyField.md

File metadata and controls

234 lines (179 loc) · 5.01 KB
external help file applicable schema
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
2.0.0

Add-PnPTaxonomyField

SYNOPSIS

Add a taxonomy field

SYNTAX

Id

Add-PnPTaxonomyField -DisplayName <String>
                     -InternalName <String>
                     [-TaxonomyItemId <GuidPipeBind>]
                     [-List <ListPipeBind>]
                     [-Group <String>]
                     [-Id <GuidPipeBind>]
                     [-AddToDefaultView [<SwitchParameter>]]
                     [-MultiValue [<SwitchParameter>]]
                     [-Required [<SwitchParameter>]]
                     [-FieldOptions <AddFieldOptions>]
                     [-Web <WebPipeBind>]
                     [-Connection <SPOnlineConnection>]

Path

Add-PnPTaxonomyField -TermSetPath <String>
                     -DisplayName <String>
                     -InternalName <String>
                     [-TermPathDelimiter <String>]
                     [-List <ListPipeBind>]
                     [-Group <String>]
                     [-Id <GuidPipeBind>]
                     [-AddToDefaultView [<SwitchParameter>]]
                     [-MultiValue [<SwitchParameter>]]
                     [-Required [<SwitchParameter>]]
                     [-FieldOptions <AddFieldOptions>]
                     [-Web <WebPipeBind>]
                     [-Connection <SPOnlineConnection>]

DESCRIPTION

Adds a taxonomy/managed metadata field to a list or as a site column.

EXAMPLES

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

PS:> Add-PnPTaxonomyField -DisplayName "Test" -InternalName "Test" -TermSetPath "TestTermGroup|TestTermSet"

Adds a new taxonomy field called "Test" that points to the TestTermSet which is located in the TestTermGroup

PARAMETERS

-AddToDefaultView

Switch Parameter if this field must be added to the default view

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-DisplayName

The display name of the field

Type: String
Parameter Sets: (All)

Required: True
Position: Named
Accept pipeline input: False

-FieldOptions

Specifies the control settings while adding a field. See https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.addfieldoptions.aspx for details

Type: AddFieldOptions
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Group

The group name to where this field belongs to

Type: String
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Id

The ID for the field, must be unique

Type: GuidPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-InternalName

The internal name of the field

Type: String
Parameter Sets: (All)

Required: True
Position: Named
Accept pipeline input: False

-List

The list object or name where this field needs to be added

Type: ListPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-MultiValue

Switch Parameter if this Taxonomy field can hold multiple values

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Required

Switch Parameter if the field is a required field

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-TaxonomyItemId

The ID of the Taxonomy item

Type: GuidPipeBind
Parameter Sets: Id

Required: False
Position: Named
Accept pipeline input: False

-TermPathDelimiter

The path delimiter to be used, by default this is '|'

Type: String
Parameter Sets: Path

Required: False
Position: Named
Accept pipeline input: False

-TermSetPath

The path to the term that this needs be be bound

Type: String
Parameter Sets: Path

Required: True
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

OUTPUTS

RELATED LINKS

SharePoint Developer Patterns and Practices