We recently migrated domains and have a Sharepoint list with hundreds of hyperlinks.

There are a handful of scripts out there for updating list items with URL fields, but am having issues translating how to do this for the "Multiple lines of text" data type.

Is there a way to run powershell PnP for Sharepoint to update these links ?

Example would be:

Current Link


New Link

  • In your "Multiple lines of text" field, does it have many URL's or only one URL per row ?? – Karthik Jaganathan Nov 19 '19 at 15:10

We can use PnP PowerShell to achieve it, the following script for your reference.

Connect-PnPOnline –Url $URL –Credentials (Get-Credential)

$Items=Get-PnPListItem -List $ListTitle -Fields "ID",$FieldName
foreach($Item in $Items){  
    $MultiFieldVal= $Item[$FieldName]    
    $NewVal=$MultiFieldVal -replace $OldUrl,$NewUrl 
    Set-PnPListItem -List $ListTitle -Identity $Item.Id -Values @{$FieldName = $NewVal}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.