PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

Get-PnPTerm unable to retrieve labels

Open ferrarirosso opened this issue 5 years ago • 2 comments

I am trying to retrieve the labels for a specific term as described in the docs, example 5 https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpterm?view=sharepoint-ps

Actual behavior

$term = Get-PnPTerm -Identity "Projects" -TermSet "Channels" -TermGroup "Intranet" This works but when I execute this $term = Get-PnPTerm -Identity "Projects" -TermSet "Channels" -TermGroup "Intranet" -Include Labels I get this Get-PnPTerm : A positional parameter cannot be found that accepts argument 'Labels'. At line:1 char:9

  • $term = Get-PnPTerm -Identity "Project" -TermSet "Channels" -TermGroup ...
    • CategoryInfo : InvalidArgument: (:) [Get-PnPTerm], ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,PnP.PowerShell.Commands.Taxonomy.GetTerm

Which version of the PnP-PowerShell Cmdlets are you using?

  • [ ] PnP PowerShell for SharePoint 2013
  • [ ] PnP PowerShell for SharePoint 2016
  • [ ] PnP PowerShell for SharePoint 2019
  • [x] PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

SharePointPnPPowerShellOnline 3.26.2010.0

How did you install the PnP-PowerShell Cmdlets?

  • [ ] MSI Installed downloaded from GitHub
  • [x] Installed through the PowerShell Gallery with Install-Module
  • [ ] Other means

ferrarirosso avatar Dec 02 '20 11:12 ferrarirosso

This looks to be a documentation error. -Includes Labels seems to work. Note the "s" on -Includes.

sympmarc avatar Jan 04 '21 16:01 sympmarc

This looks to be a documentation error. -Includes Labels seems to work. Note the "s" on -Includes.

Tried it, doesn't work $term = Get-PnPTerm -Identity "Projects" -TermSet "Channels" -TermGroup "Intranet" -Includes Labels
Get-PnPTerm : Specified argument was out of the range of valid values. Parameter name: index At line:1 char:9

  • $term = Get-PnPTerm -Identity "Projects" -TermSet "Channels" -TermGro ...
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Get-PnPTerm], ServerException
    • FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Taxonomy.GetTerm

ferrarirosso avatar Jan 14 '21 15:01 ferrarirosso