Cli-microsoft365: New command: `spo page copy` to be able to create a page from an existing one

Created on 20 Jan 2021  路  5Comments  路  Source: pnp/cli-microsoft365

Usage

The page copy command can be used to create a copy from an existing page. This is useful when using page templates.

Description

Allows you to copy a modern page from an existing page or template.

Options

| Option | Description |
| ----------------------- | ----------------------------------------- |
| --sourceName <sourceName> | Name of the source file |
| --targetName <targetName> | Name of the target file to be created |
| --webUrl | The URL of the site |
| --overwrite | Overwrite the target page when it already exists |
| --verbose | Runs command with verbose logging |
| --debug | Runs command with debug logging |

feature request work in progress

Most helpful comment

I'll do the change

All 5 comments

Great suggestion! 馃憦

Great suggestion! 馃憦馃徎

Maybe something to consider as an enhancement but as it's easy to go cross site with the CLI and not have to re-authenticate we could add sourceUrl and targetUrl options which take absolute paths.

@garrytrinder that is also an option. Shall we change targetName to targetUrl? That can be relative or absolute. This way, you can copy it to the same site, or another site.

Sounds like a plan 馃憤馃徎

I'll do the change

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VelinGeorgiev picture VelinGeorgiev  路  3Comments

OodapowUiPath picture OodapowUiPath  路  3Comments

garrytrinder picture garrytrinder  路  3Comments

thomyg picture thomyg  路  3Comments

andrewconnell picture andrewconnell  路  3Comments