Skip to content

New command: spo page control remove - Remove a control from a modern SharePoint page #6770

@milanholemans

Description

@milanholemans

Usage

m365 spo page control remove [options]

Description

Removes a control from a modern SharePoint page.

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the page is located.
-n, --pageName <pageName> Name of the page where the control is located.
-i, --id <id> The ID of the control to be removed.
--draft Save the page as draft instead of republishing.
-f, --force Don't prompt for confirmation.

Examples

Remove a control from a SharePoint page by ID, with confirmation

m365 spo page control remove --webUrl https://contoso.sharepoint.com/sites/Marketing --pageName home.aspx --id b3d6ebc9-6c7b-4e1e-99c1-4c08b682e8c1

Remove a control from a SharePoint page and don't republish the page

m365 spo page control remove --webUrl https://contoso.sharepoint.com/sites/Marketing--pageName "Archive/home.aspx" --id b3d6ebc9-6c7b-4e1e-99c1-4c08b682e8c1 --draft

Additional Info

This command implements a missing feature for manipulating SharePoint page content via CLI.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions