Add-PnPClientSideWebPart
Syntax
Add-PnPClientSideWebPart
-Page <ClientSidePagePipeBind>
-DefaultWebPartType <DefaultClientSideWebParts>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Add-PnPClientSideWebPart
-Page <ClientSidePagePipeBind>
-Component <ClientSideComponentPipeBind>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Add-PnPClientSideWebPart
-Page <ClientSidePagePipeBind>
-DefaultWebPartType <DefaultClientSideWebParts>
-Section <Int>
-Column <Int>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Add-PnPClientSideWebPart
-Page <ClientSidePagePipeBind>
-Component <ClientSideComponentPipeBind>
-Section <Int>
-Column <Int>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Description
Adds a client-side web part to an existing client-side page.
Examples
------------------EXAMPLE 1------------------
Add-PnPClientSideWebPart -Page "MyPage" -DefaultWebPartType BingMap
Adds a built-in Client-Side component 'BingMap' to the page called 'MyPage'
------------------EXAMPLE 2------------------
Add-PnPClientSideWebPart -Page "MyPage" -Component "HelloWorld"
Adds a Client-Side component 'HelloWorld' to the page called 'MyPage'
------------------EXAMPLE 3------------------
Add-PnPClientSideWebPart -Page "MyPage" -Component "HelloWorld" -Section 1 -Column 2
Adds a Client-Side component 'HelloWorld' to the page called 'MyPage' in section 1 and column 2
Parameters
Sets the column where to insert the web part control.
Type: | Int |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the component instance or Id to add.
Type: | ClientSideComponentPipeBind |
Position: | Named |
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: | SPOnlineConnection |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Defines a default web part type to insert.
Type: | DefaultClientSideWebParts |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Sets the order of the web part control. (Default = 1)
Type: | Int |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The name of the page.
Type: | ClientSidePagePipeBind |
Position: | 0 |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Sets the section where to insert the web part control.
Type: | Int |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
The properties of the web part
Type: | PropertyBagPipeBind |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Related Links
Feedback
Loading feedback...