pnp / pnp/cli-microsoft365

New command: `spo page unpublish`

Open
#7,540 2 comments 0 reactions 1 assignee View on GitHub

@Anikesh348 is already working on this.

Since Sep 3, 2026.

good first issue new feature work in progress
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

Usage

m365 spo page unpublish [options]

Description

Unpublishes a modern page

Options
Option Description
-u, --webUrl <webUrl> URL of the site.
-n, --name <name> Name of the page to target.
Examples

Publish a modern page

m365 spo page unpublish --webUrl https://contoso.sharepoint.com/sites/Marketing --name "Style guide.aspx"

Publish a modern page in a subfolder

m365 spo page unpublish --webUrl https://contoso.sharepoint.com/sites/Marketing --name "/Styles/Guide.aspx"
Default properties

No response

Additional Info

API URL:

POST https://contoso.sharepoint.com/sites/Playground/_api/web/GetFileByServerRelativePath(DecodedUrl='/sites/Playground/SitePages/Home.aspx')/UnPublish

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.