Skip to content

Commit b32d3cd

Browse files
committed
New command: m365 pp website remove. Closes #6257
1 parent bc374af commit b32d3cd

5 files changed

Lines changed: 513 additions & 1 deletion

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import Global from '../../_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# pp website remove
6+
7+
Removes the specified Power Pages website from the list of active sites.
8+
9+
## Usage
10+
11+
```sh
12+
m365 pp website remove [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`-u, --url [url]`
19+
: The URL of the website to remove. Specify either `url`, `name` or `id`.
20+
21+
`-n, --name [name]`
22+
: The name of the website to remove. Specify either `url`, `name` or `id`.
23+
24+
`-i, --id [id]`
25+
: The WebSite Id (GUID) of the website to remove. Specify either `url`, `name` or `id`.
26+
27+
`-e, --environmentName <environmentName>`
28+
: The name of the environment from which to remove the Power Pages website.
29+
30+
`-f, --force`
31+
: Don't prompt for confirmation
32+
```
33+
34+
<Global />
35+
36+
## Permissions
37+
38+
<Tabs>
39+
<TabItem value="Delegated">
40+
41+
| Resource | Permissions |
42+
|--------------------|---------------------------|
43+
| Power Platform API | PowerPages.Websites.Write |
44+
45+
</TabItem>
46+
</Tabs>
47+
48+
## Examples
49+
50+
Remove Power Pages website by name.
51+
52+
```sh
53+
m365 pp website remove --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
54+
```
55+
56+
Remove Power Pages website by name without confirmation.
57+
58+
```sh
59+
m365 pp website remove --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
60+
```
61+
62+
Remove Power Pages website by id.
63+
64+
```sh
65+
m365 pp website remove --id 4916bb2c-91e1-4716-91d5-b6171928fac9 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
66+
```
67+
68+
Remove Power Pages website by id without confirmation.
69+
70+
```sh
71+
m365 pp website remove --id 4916bb2c-91e1-4716-91d5-b6171928fac9 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
72+
```
73+
74+
Remove Power Pages website by url.
75+
76+
```sh
77+
m365 pp website remove --url https://site-0uaq9.powerappsportals.com --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
78+
```
79+
80+
Remove Power Pages website by url without confirmation.
81+
82+
```sh
83+
m365 pp website remove --url https://site-0uaq9.powerappsportals.com --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
84+
```
85+
86+
## Response
87+
88+
The command won't return a response on success.
89+

docs/src/config/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,11 @@ const sidebars: SidebarsConfig = {
19961996
type: 'doc',
19971997
label: 'website get',
19981998
id: 'cmd/pp/website/website-get'
1999+
},
2000+
{
2001+
type: 'doc',
2002+
label: 'website remove',
2003+
id: 'cmd/pp/website/website-remove'
19992004
}
20002005
]
20012006
}

src/m365/pp/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export default {
2828
SOLUTION_PUBLISHER_REMOVE: `${prefix} solution publisher remove`,
2929
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
3030
TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
31-
WEBSITE_GET: `${prefix} website get`
31+
WEBSITE_GET: `${prefix} website get`,
32+
WEBSITE_REMOVE: `${prefix} website remove`
3233
};

0 commit comments

Comments
 (0)