Search Results for

    Show / Hide Table of Contents

    Add-PnPTaxonomyField

    SYNOPSIS

    Add a taxonomy field

    SYNTAX

    Path

    Add-PnPTaxonomyField [-List <ListPipeBind>] -DisplayName <String> -InternalName <String> -TermSetPath <String>
     [-TermPathDelimiter <String>] [-Group <String>] [-Id <Guid>] [-AddToDefaultView] [-MultiValue]
     [-Required] [-FieldOptions <AddFieldOptions>] [-Connection <PnPConnection>]
     
    

    Id

    Add-PnPTaxonomyField [-List <ListPipeBind>] -DisplayName <String> -InternalName <String> 
    -TaxonomyItemId <Guid> [-Group <String>] [-Id <Guid>] [-AddToDefaultView] [-MultiValue]
     [-Required] [-FieldOptions <AddFieldOptions>] [-Connection <PnPConnection>]
     
    

    DESCRIPTION

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

    EXAMPLES

    EXAMPLE 1

    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

    EXAMPLE 2

    Add-PnPTaxonomyField -DisplayName "Test" -InternalName "Test" -TaxonomyItemId "0e5fe3c6-3e6a-4d25-9f48-82a655f15992" 
    

    Adds a new taxonomy field called "Test" that points to the Term set with the term set id of 0e5fe3c6-3e6a-4d25-9f48-82a655f15992

    PARAMETERS

    -AddToDefaultView

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

    Type: SwitchParameter
    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
    

    -DisplayName

    The display name of the field

    Type: String
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -FieldOptions

    Specifies the control settings while adding a field. See https://learn.microsoft.com/previous-versions/office/sharepoint-server/ee542202(v=office.15) for details

    Type: AddFieldOptions
    Parameter Sets: (All)
    Accepted values: DefaultValue, AddToDefaultContentType, AddToNoContentType, AddToAllContentTypes, AddFieldInternalNameHint, AddFieldToDefaultView, AddFieldCheckDisplayName
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Group

    The group name to where this field belongs to

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Id

    The ID for the field, must be unique

    Type: Guid
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -InternalName

    The internal name of the field

    Type: String
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -List

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

    Type: ListPipeBind
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -MultiValue

    Switch Parameter if this Taxonomy field can hold multiple values

    Type: SwitchParameter
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Required

    Switch Parameter if the field is a required field

    Type: SwitchParameter
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -TaxonomyItemId

    The ID of the Taxonomy item

    Type: Guid
    Parameter Sets: Id
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -TermPathDelimiter

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

    Type: String
    Parameter Sets: Path
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -TermSetPath

    The path to the term that this needs to be bound

    Type: String
    Parameter Sets: Path
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer