Import-PnPTaxonomy

Imports a taxonomy from either a string array or a file

Syntax

Import-PnPTaxonomy
      [-Terms <String[]>]
                        [-Lcid <Int>]
                        [-TermStoreName <String>]
                        [-Delimiter <String>]
                        [-SynchronizeDeletions [<SwitchParameter>]]
                        [-Connection <SPOnlineConnection>]
Import-PnPTaxonomy
      -Path <String>
                        [-Lcid <Int>]
                        [-TermStoreName <String>]
                        [-Delimiter <String>]
                        [-SynchronizeDeletions [<SwitchParameter>]]
                        [-Connection <SPOnlineConnection>]

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.

Required Parameters

-Path

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

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Optional 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
-Delimiter

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

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Lcid
Type:Int
Position:Named
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
Position:Named
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
Position:Named
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[]
Position:Named
Accept pipeline input:True
Accept wildcard characters:False