Search Results for

    Show / Hide Table of Contents

    Import-PnPTaxonomy

    SYNOPSIS

    Imports a taxonomy from either a string array or a file

    SYNTAX

    Direct

    Import-PnPTaxonomy [-Terms <String[]>] [-Lcid <Int32>] [-TermStoreName <String>] [-Delimiter <String>]
     [-SynchronizeDeletions] [-Connection <PnPConnection>]   
    

    File

    Import-PnPTaxonomy -Path <String> [-Lcid <Int32>] [-TermStoreName <String>] [-Delimiter <String>]
     [-SynchronizeDeletions] [-Connection <PnPConnection>]   
    

    DESCRIPTION

    Allows to import taxonomy terms from array or file.

    EXAMPLES

    EXAMPLE 1

    Import-PnPTaxonomy -Terms 'Company|Locations|Stockholm'
    

    Creates a new termgroup, 'Company', a termset 'Locations' and a term 'Stockholm'

    EXAMPLE 2

    Import-PnPTaxonomy -Terms 'Company|Locations|Stockholm|Central','Company|Locations|Stockholm|North'
    

    Creates a new termgroup, 'Company', a termset 'Locations', a term 'Stockholm' and two subterms: 'Central', and 'North'

    EXAMPLE 3

    Import-PnPTaxonomy -Path ./mytaxonomyterms.txt
    

    Imports the taxonomy from the file specified. Each line has to be in the format TERMGROUP|TERMSET|TERM. See example 2 for examples of the format.

    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
    

    -Delimiter

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

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

    -Lcid

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

    -Path

    Specifies a file containing terms per line, in the format as required by the Terms parameter.

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

    -SynchronizeDeletions

    If specified, terms that exist in the termset, but are not in the imported data, will be removed.

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

    -TermStoreName

    Term store to import to; if not specified the default term store is used.

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

    -Terms

    An array of strings describing termgroup, termset, term, subterms using a default delimiter of '|'.

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

    -WhatIf

    Shows what would happen if the cmdlet runs. The cmdlet is not run.

    Type: SwitchParameter
    Parameter Sets: (All)
    Aliases: wi
    
    Required: False
    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