Get-PnPTerm

Returns a taxonomy term

Syntax

Get-PnPTerm
   [-Includes <String[]>]
              [-IncludeChildTerms [<SwitchParameter>]]
              [-Connection <SPOnlineConnection>]
Get-PnPTerm
   -Identity <Id, Name or Object>
              [-TermStore <Id, Name or Object>]
              [-IncludeChildTerms [<SwitchParameter>]]
              [-Connection <SPOnlineConnection>]
Get-PnPTerm
   -TermSet <Id, Title or TaxonomyItem>
              -TermGroup <Id, Title or TermGroup>
              [-Identity <Id, Name or Object>]
              [-TermStore <Id, Name or Object>]
              [-Recursive [<SwitchParameter>]]
              [-IncludeChildTerms [<SwitchParameter>]]
              [-Connection <SPOnlineConnection>]

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's a subterm below "Finance"

Required Parameters

-Identity

The Id or Name of a Term

Type:Id, Name or Object
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-TermGroup

Name of the termgroup to check.

Type:Id, Title or TermGroup
Position:0
Accept pipeline input:True
Accept wildcard characters:False
-TermSet

Name of the termset to check.

Type:Id, Title or TaxonomyItem
Position:0
Accept pipeline input:True
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
-IncludeChildTerms

Includes the hierarchy of child terms if available

Only applicable to: SharePoint Online

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Includes

Specify properties to include when retrieving objects from the server.

Type:String[]
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-Recursive

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

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-TermStore

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

Type:Id, Name or Object
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.Taxonomy.Term