Add-PnPWebPartToWikiPage

Adds a web part to a wiki page in a specified table row and column

Syntax

Add-PnPWebPartToWikiPage
   -Xml <String>
                           -ServerRelativePageUrl <String>
                           -Row <Int>
                           -Column <Int>
                           [-AddSpace [<SwitchParameter>]]
                           [-Web <WebPipeBind>]
                           [-Connection <SPOnlineConnection>]
Add-PnPWebPartToWikiPage
   -Path <String>
                           -ServerRelativePageUrl <String>
                           -Row <Int>
                           -Column <Int>
                           [-AddSpace [<SwitchParameter>]]
                           [-Web <WebPipeBind>]
                           [-Connection <SPOnlineConnection>]

Examples

------------------EXAMPLE 1------------------

Add-PnPWebPartToWikiPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Path "c:\myfiles\listview.webpart" -Row 1 -Column 1

This will add the web part as defined by the XML in the listview.webpart file to the specified page in the first row and the first column of the HTML table present on the page

------------------EXAMPLE 2------------------

Add-PnPWebPartToWikiPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -XML $webpart -Row 1 -Column 1

This will add the web part as defined by the XML in the $webpart variable to the specified page in the first row and the first column of the HTML table present on the page

Parameters

-AddSpace

Must there be a extra space between the web part

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Column

Column number where the web part must be placed

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Path

A path to a web part file on a the file system.

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Row

Row number where the web part must be placed

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-ServerRelativePageUrl

Full server relative url of the web part page, e.g. /sites/demo/sitepages/home.aspx

Type:String
Aliases:PageUrl
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Xml

A string containing the XML for the web part.

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False