pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
909 stars 317 forks source link

New command: m365 pp website remove #6257

Open appieschot opened 4 weeks ago

appieschot commented 4 weeks ago

Usage

m365 pp website remove [options]

Description

Removes the specified Power Pages website

Options

Option Description
-i, --id [id] ID of the Power Pages website. Specify either id or name but not both.
-n, --name [name] The unique name (not the display name) of the Power Pages website. Specify either id or name but not both.
-e, --environmentName <environmentName> The name of the environment.
--asAdmin Set, to remove the Power Pages website as admin if you don't have sufficient permissions
-f, --force Don't prompt for confirmation

Examples

Deletes 2ca3eaa5-140f-4175-8261-3272edf9f339 Power Pages website in the given environment.

m365 pp website remove --id "2ca3eaa5-140f-4175-8261-3272edf9f339" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"

Deletes ContosoDemo Power Pages website in the given environment without confirmation prompt.

m365 pp website remove --name "ContosoDemo" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --force

Additional Info

Have a look at: https://learn.microsoft.com/en-us/rest/api/power-platform/powerpages/websites/delete-website

milanholemans commented 4 weeks ago

Hi @appieschot, one remark:

appieschot commented 3 weeks ago

Updated

milanholemans commented 3 weeks ago

One more remark, instead of environment, we usually use -e, --environmentName <environmentName>. Also, let's try to use the full option names in the examples.

appieschot commented 3 weeks ago

As you wish