Module Name | schema | applicable | online version | external help file | title |
---|---|---|---|---|---|
PnP.PowerShell |
2.0.0 |
SharePoint Online |
PnP.PowerShell.dll-Help.xml |
Add-PnPWebPartToWikiPage |
Adds a web part to a wiki page in a specified table row and column
Add-PnPWebPartToWikiPage -ServerRelativePageUrl <String> -Xml <String> -Row <Int32> -Column <Int32> [-AddSpace]
[-Connection <PnPConnection>]
Add-PnPWebPartToWikiPage -ServerRelativePageUrl <String> -Path <String> -Row <Int32> -Column <Int32>
[-AddSpace] [-Connection <PnPConnection>]
Allows to add a web part a wiki page. Use the Row
and Column
option to specify the location of the web part.
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
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
Must there be an extra space between the web part
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Column number where the web part must be placed
Type: Int32
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A path to a web part file on a the file system.
Type: String
Parameter Sets: FILE
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Row number where the web part must be placed
Type: Int32
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Full server relative url of the web part page, e.g. /sites/demo/sitepages/home.aspx
Type: String
Parameter Sets: (All)
Aliases: PageUrl
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A string containing the XML for the web part.
Type: String
Parameter Sets: XML
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False