Get-PnPTerm

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPTerm.md to change this file.

Returns a Term Store Term.

Syntax

Get-PnPTerm
      -Identity <Guid>
      [-TermStore <Guid>]
      [-IncludeChildTerms]
   [-Connection <PnPConnection>]
   [-Includes <String[]>]
   [<CommonParameters>]
Get-PnPTerm
      -Identity <Name>
      -TermSet <Guid|Name>
      -TermGroup <Guid|Name>
      [-TermStore <Guid>]
      [-Recursive]
       [-IncludeChildTerms]
   [-Connection <PnPConnection>]
   [-Includes <String[]>]
   [<CommonParameters>]

Description

Retries a Term Store Term.

Examples

EXAMPLE 1

Get-PnPTerm -TermSet "Departments" -TermGroup "Corporate"

Returns all term in the termset "Departments" which is in the group "Corporate" from the site collection termstore

EXAMPLE 2

Get-PnPTerm -Identity "Finance" -TermSet "Departments" -TermGroup "Corporate"

Returns the term named "Finance" in the termset "Departments" from the termgroup called "Corporate" from the site collection termstore

EXAMPLE 3

Get-PnPTerm -Identity ab2af486-e097-4b4a-9444-527b251f1f8d -TermSet "Departments" -TermGroup "Corporate"

Returns the term named with the given id, from the "Departments" termset in a term group called "Corporate" from the site collection termstore

EXAMPLE 4

Get-PnPTerm -Identity "Small Finance" -TermSet "Departments" -TermGroup "Corporate" -Recursive

Returns the term named "Small Finance", from the "Departments" termset in a term group called "Corporate" from the site collection termstore even if it is a subterm below "Finance"

EXAMPLE 5

$term = Get-PnPTerm -Identity "Small Finance" -TermSet "Departments" -TermGroup "Corporate" -Include Labels
$term.Labels

Returns all the localized labels for the term named "Small Finance", from the "Departments" termset in a term group called "Corporate"

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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Identity

The Id or Name of a Term

Type:GenericObjectNameIdPipeBind<Microsoft.SharePoint.Client.Taxonomy.Term>
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncludeChildTerms

Includes the hierarchy of child terms if available

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Recursive

Find the first term recursively matching the label in a term hierarchy.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TermGroup

Name of the termgroup to check.

Type:TermGroupPipeBind
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-TermSet

Name of the termset to check.

Type:TaxonomyItemPipeBind<TermSet>
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-TermStore

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

Type:GenericObjectNameIdPipeBind<TermStore>
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False