Table of contents
TOC
Collapse the table of content
Expand the table of content

Get-PnPWebPartXml

Bert Jansen|Last Updated: 2/20/2017
|
1 Contributor

Returns the webpart XML of a webpart registered on a site

Syntax

Get-PnPWebPartXml -ServerRelativePageUrl <String>
                  -Identity <WebPartPipeBind>
                  [-Web <WebPipeBind>]

Returns

System.String

Parameters

ParameterTypeRequiredDescription
IdentityWebPartPipeBindTrueId or title of the webpart. Use Get-PnPWebPart to retrieve all webpart Ids
ServerRelativePageUrlStringTrueFull server relative url of the webpart page, e.g. /sites/mysite/sitepages/home.aspx
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Get-PnPWebPartXml -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Identity a2875399-d6ff-43a0-96da-be6ae5875f82

Returns the webpart XML for a given webpart on a page.

© 2017 Microsoft