Pnp-powershell: Hyperlink with Set-PnPListItem

Created on 7 Dec 2016  路  1Comment  路  Source: pnp/PnP-PowerShell

Hi

I have an issue setting a hyperlink field with Set-PnPListItem as documented.
I do something like:
Set-PnPListItem -List Project_list -Identity 4 -Values @{"GitURL" = "https://test.com/PRJ007/,GITPRJ007"}

And would expect the field to be added as
Field: GitURL
URL: https://test.com/PRJ007
Display Text: GITPRJ007

But what I get instead is:
Field: GitURL
URL: https://test.com/PRJ007/,,GITPRJ007
Display Text: https://test.com/PRJ007/,GITPRJ007

Any idea?

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

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

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

2.9.1611.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

Most helpful comment

You missed out a space after the comma in the URL.

Set-PnPListItem -List Project_list -Identity 4 -Values @{"GitURL" = "https://test.com/PRJ007/, GITPRJ007"}

>All comments

You missed out a space after the comma in the URL.

Set-PnPListItem -List Project_list -Identity 4 -Values @{"GitURL" = "https://test.com/PRJ007/, GITPRJ007"}

Was this page helpful?
0 / 5 - 0 ratings