Is it possible to update the heading Title of a Modern People Webpart in SharePoint Online via Powershell?

Blair Saunders 20 Reputation points
2024-03-13T19:38:50.26+00:00

I have a situation where I'm trying to see if its possible to update the Heading Title for the People Webpart through PowerShell. We have a situation where i want to change the heading text across thousands of pages and updating these manually would be a time consuming task. The problem i have found is the Heading Title does not seem to be apart of the Properties of the webpart using Set-PnPPageWebPart the title of which is a parameter is to set the internal name of the webpart as well as the PropertiesJson also only updates the internal name.

I have found that i can get the data using a round about way but i don't think i can set it here.

Powershell: 7.4.1

PnpPowershell: 2.1.1

$pageContent = Get-PnPPage -Identity "test-page.aspx"

$webpart = $pageContent.Controls | Where-Object { $_.InstanceId -eq "[WebpartID]" }

$webpart.ServerProcessedContent

$jsonObject = ConvertFrom-Json $webpart.ServerProcessedContent

$jsonObject.searchablePlainTexts.title

Is there a way that this can be set programmatically?

Microsoft 365 and Office | SharePoint | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,476 Reputation points Microsoft External Staff
    2024-03-14T03:06:54.48+00:00

    Hi @Blair Saunders,

    After doing some research and test, I am unable to update the title of the people webpart. This property should be the content in the webpart. There is no such properties in pnp powershell to edit. I feel regretful to inform you that it turns out to be a by-design one.

    It is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.