Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Get-PnPTerm unable to retrieve labels #3017

Open
2 of 7 tasks
ferrarirosso opened this issue Dec 2, 2020 · 2 comments
Open
2 of 7 tasks

Get-PnPTerm unable to retrieve labels #3017

ferrarirosso opened this issue Dec 2, 2020 · 2 comments
Assignees
Labels

Comments

@ferrarirosso
Copy link

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
  • 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
  • Installed through the PowerShell Gallery with Install-Module
  • Other means
@sympmarc
Copy link
Contributor

sympmarc commented Jan 4, 2021

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

@ferrarirosso
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants