Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Commands/WebParts/RemoveWebPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace SharePointPnP.PowerShell.Commands.WebParts
[CmdletHelp("Removes a webpart from a page",
Category = CmdletHelpCategory.WebParts)]
[CmdletExample(
Code = @"PS:> Remove-PnPWebPartToWikiPage -ServerRelativePageUrl ""/sites/demo/sitepages/home.aspx"" -Identity a2875399-d6ff-43a0-96da-be6ae5875f82",
Remarks = @"This will remove the webpart 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",
Code = @"PS:> Remove-PnPWebPart -ServerRelativePageUrl ""/sites/demo/sitepages/home.aspx"" -Identity a2875399-d6ff-43a0-96da-be6ae5875f82",
Remarks = @"This will remove the webpart specified by ID to the specified page in the first row and the first column of the HTML table present on the page",
SortOrder = 1)]
[CmdletExample(
Code = @"PS:> Remove-PnPWebPartToWikiPage -ServerRelativePageUrl ""/sites/demo/sitepages/home.aspx"" -Name MyWebpart",
Remarks = @"This will remove the webpart 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",
Code = @"PS:> Remove-PnPWebPart -ServerRelativePageUrl ""/sites/demo/sitepages/home.aspx"" -Title MyWebpart",
Remarks = @"This will remove the webpart specified by title to the specified page in the first row and the first column of the HTML table present on the page",
SortOrder = 1)]
public class RemoveWebPart : PnPWebCmdlet
{
Expand All @@ -28,7 +28,7 @@ public class RemoveWebPart : PnPWebCmdlet
[Alias("Name")]
public string Title = string.Empty;

[Parameter(Mandatory = true, ParameterSetName = ParameterAttribute.AllParameterSets, HelpMessage = "Full server relative url of the webpart page, e.g. /sites/demo/sitepages/home.aspx")]
[Parameter(Mandatory = true, ParameterSetName = ParameterAttribute.AllParameterSets, HelpMessage = "Server relative url of the webpart page, e.g. /sites/demo/sitepages/home.aspx")]
[Alias("PageUrl")]
public string ServerRelativePageUrl = string.Empty;

Expand Down