@pnp/cli-microsoft365 5.5.0-beta.f697eab → 5.6.0-beta.3d0b974

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ const Command_1 = require("../../../../Command");
5
5
  const utils_1 = require("../../../../utils");
6
6
  const SpoCommand_1 = require("../../../base/SpoCommand");
7
7
  const commands_1 = require("../../commands");
8
- const spoSiteClassicAddCommand = require("../site/site-classic-add");
8
+ const spoSiteAddCommand = require("../site/site-add");
9
9
  const spoSiteGetCommand = require("../site/site-get");
10
10
  const spoSiteRemoveCommand = require("../site/site-remove");
11
11
  const spoTenantAppCatalogUrlGetCommand = require("./tenant-appcatalogurl-get");
@@ -21,7 +21,7 @@ class SpoTenantAppCatalogAddCommand extends SpoCommand_1.default {
21
21
  logger.logToStderr('Checking for existing app catalog URL...');
22
22
  }
23
23
  cli_1.Cli
24
- .executeCommandWithOutput(spoTenantAppCatalogUrlGetCommand, { options: { _: [] } })
24
+ .executeCommandWithOutput(spoTenantAppCatalogUrlGetCommand, { options: { output: 'text', _: [] } })
25
25
  .then((spoTenantAppCatalogUrlGetCommandOutput) => {
26
26
  const appCatalogUrl = spoTenantAppCatalogUrlGetCommandOutput.stdout;
27
27
  if (!appCatalogUrl) {
@@ -33,6 +33,7 @@ class SpoTenantAppCatalogAddCommand extends SpoCommand_1.default {
33
33
  if (this.verbose) {
34
34
  logger.logToStderr(`Found app catalog URL ${appCatalogUrl}`);
35
35
  }
36
+ //Using JSON.parse
36
37
  return this.ensureNoExistingSite(appCatalogUrl, args.options.force, logger);
37
38
  })
38
39
  .then(() => this.ensureNoExistingSite(args.options.url, args.options.force, logger))
@@ -92,17 +93,19 @@ class SpoTenantAppCatalogAddCommand extends SpoCommand_1.default {
92
93
  if (this.verbose) {
93
94
  logger.logToStderr(`Creating app catalog at ${options.url}...`);
94
95
  }
95
- const siteClassicAddOptions = {
96
+ const siteAddOptions = {
96
97
  webTemplate: 'APPCATALOG#0',
97
98
  title: 'App catalog',
99
+ type: 'ClassicSite',
98
100
  url: options.url,
99
101
  timeZone: options.timeZone,
100
- owner: options.owner,
102
+ owners: options.owner,
101
103
  wait: options.wait,
102
104
  verbose: this.verbose,
103
- debug: this.debug
105
+ debug: this.debug,
106
+ removeDeletedSite: false
104
107
  };
105
- return cli_1.Cli.executeCommand(spoSiteClassicAddCommand, { options: Object.assign(Object.assign({}, siteClassicAddOptions), { _: [] }) });
108
+ return cli_1.Cli.executeCommand(spoSiteAddCommand, { options: Object.assign(Object.assign({}, siteAddOptions), { _: [] }) });
106
109
  }
107
110
  options() {
108
111
  const options = [
@@ -54,6 +54,7 @@ exports.default = {
54
54
  FILE_LIST: `${prefix} file list`,
55
55
  FILE_MOVE: `${prefix} file move`,
56
56
  FILE_REMOVE: `${prefix} file remove`,
57
+ FILE_RENAME: `${prefix} file rename`,
57
58
  FILE_SHARINGINFO_GET: `${prefix} file sharinginfo get`,
58
59
  FOLDER_ADD: `${prefix} folder add`,
59
60
  FOLDER_COPY: `${prefix} folder copy`,
@@ -124,10 +124,10 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
124
124
  option: '--channelName [channelName]'
125
125
  },
126
126
  {
127
- option: '--tabId [tabId]'
127
+ option: '-i, --tabId [tabId]'
128
128
  },
129
129
  {
130
- option: '--tabName [tabName]'
130
+ option: '-n, --tabName [tabName]'
131
131
  }
132
132
  ];
133
133
  const parentOptions = super.options();
@@ -15,13 +15,24 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
15
15
  const telemetryProps = super.getTelemetryProperties(args);
16
16
  telemetryProps.description = typeof args.options.description !== 'undefined';
17
17
  telemetryProps.classification = typeof args.options.classification !== 'undefined';
18
- telemetryProps.visibility = typeof args.options.visibility !== 'undefined';
18
+ telemetryProps.id = typeof args.options.id !== 'undefined';
19
+ telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
20
+ telemetryProps.name = typeof args.options.name !== 'undefined';
21
+ telemetryProps.displayName = typeof args.options.displayName !== 'undefined';
19
22
  return telemetryProps;
20
23
  }
21
24
  commandAction(logger, args, cb) {
25
+ if (args.options.teamId) {
26
+ args.options.id = args.options.teamId;
27
+ this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
28
+ }
29
+ if (args.options.displayName) {
30
+ args.options.name = args.options.displayName;
31
+ this.warn(logger, `Option 'displayName' is deprecated. Please use 'name' instead.`);
32
+ }
22
33
  const data = {
23
- displayName: args.options.displayName,
24
- mailNickname: this.generateMailNickname(args.options.displayName),
34
+ displayName: args.options.name,
35
+ mailNickname: this.generateMailNickname(args.options.name),
25
36
  partsToClone: args.options.partsToClone
26
37
  };
27
38
  if (args.options.description) {
@@ -34,7 +45,7 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
34
45
  data.visibility = args.options.visibility;
35
46
  }
36
47
  const requestOptions = {
37
- url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/clone`,
48
+ url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.id)}/clone`,
38
49
  headers: {
39
50
  "content-type": "application/json",
40
51
  accept: 'application/json;odata.metadata=none'
@@ -46,13 +57,25 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
46
57
  .post(requestOptions)
47
58
  .then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
48
59
  }
60
+ optionSets() {
61
+ return [
62
+ ['id', 'teamId'],
63
+ ['name', 'displayName']
64
+ ];
65
+ }
49
66
  options() {
50
67
  const options = [
51
68
  {
52
- option: '-i, --teamId <teamId>'
69
+ option: '-i, --id [teamId]'
53
70
  },
54
71
  {
55
- option: '-n, --displayName <displayName>'
72
+ option: '--teamId [teamId]'
73
+ },
74
+ {
75
+ option: '-n, --name [name]'
76
+ },
77
+ {
78
+ option: '--displayName [displayName]'
56
79
  },
57
80
  {
58
81
  option: '-p, --partsToClone <partsToClone>',
@@ -73,9 +96,12 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
73
96
  return options.concat(parentOptions);
74
97
  }
75
98
  validate(args) {
76
- if (!utils_1.validation.isValidGuid(args.options.teamId)) {
99
+ if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
77
100
  return `${args.options.teamId} is not a valid GUID`;
78
101
  }
102
+ if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
103
+ return `${args.options.id} is not a valid GUID`;
104
+ }
79
105
  const partsToClone = args.options.partsToClone.replace(/\s/g, '').split(',');
80
106
  for (const partToClone of partsToClone) {
81
107
  const part = partToClone.toLowerCase();
@@ -20,8 +20,8 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
20
20
  }
21
21
  mapRequestBody(options) {
22
22
  const requestBody = {};
23
- if (options.displayName) {
24
- requestBody.displayName = options.displayName;
23
+ if (options.name) {
24
+ requestBody.displayName = options.name;
25
25
  }
26
26
  if (options.description) {
27
27
  requestBody.description = options.description;
@@ -38,9 +38,17 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
38
38
  return requestBody;
39
39
  }
40
40
  commandAction(logger, args, cb) {
41
+ if (args.options.teamId) {
42
+ args.options.id = args.options.teamId;
43
+ this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
44
+ }
45
+ if (args.options.displayName) {
46
+ args.options.name = args.options.displayName;
47
+ this.warn(logger, `Option 'displayName' is deprecated. Please use 'name' instead.`);
48
+ }
41
49
  const data = this.mapRequestBody(args.options);
42
50
  const requestOptions = {
43
- url: `${this.resource}/v1.0/groups/${encodeURIComponent(args.options.teamId)}`,
51
+ url: `${this.resource}/v1.0/groups/${encodeURIComponent(args.options.id)}`,
44
52
  headers: {
45
53
  accept: 'application/json;odata.metadata=none'
46
54
  },
@@ -51,10 +59,19 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
51
59
  .patch(requestOptions)
52
60
  .then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
53
61
  }
62
+ optionSets() {
63
+ return [['id', 'teamId']];
64
+ }
54
65
  options() {
55
66
  const options = [
56
67
  {
57
- option: '-i, --teamId <teamId>'
68
+ option: '-i, --id [id]'
69
+ },
70
+ {
71
+ option: '--teamId [teamId]'
72
+ },
73
+ {
74
+ option: '-n, --name [name]'
58
75
  },
59
76
  {
60
77
  option: '--displayName [displayName]'
@@ -77,9 +94,12 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
77
94
  return options.concat(parentOptions);
78
95
  }
79
96
  validate(args) {
80
- if (!utils_1.validation.isValidGuid(args.options.teamId)) {
97
+ if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
81
98
  return `${args.options.teamId} is not a valid GUID`;
82
99
  }
100
+ if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
101
+ return `${args.options.id} is not a valid GUID`;
102
+ }
83
103
  if (args.options.visibility) {
84
104
  if (args.options.visibility.toLowerCase() !== 'private' && args.options.visibility.toLowerCase() !== 'public') {
85
105
  return `${args.options.visibility} is not a valid visibility type. Allowed values are Private|Public`;
@@ -10,8 +10,11 @@ m365 spo customaction get [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-i, --id <id>`
14
- : ID of the user custom action to retrieve information for
13
+ `-i, --id [id]`
14
+ : ID of the user custom action to retrieve information for. Specify either `id` or `title`
15
+
16
+ `-t, --title [title]`
17
+ : Title of the user custom action to retrieve information for. Specify either `id` or `title`
15
18
 
16
19
  `-u, --url <url>`
17
20
  : Url of the site or site collection to retrieve the custom action from
@@ -21,6 +24,10 @@ m365 spo customaction get [options]
21
24
 
22
25
  --8<-- "docs/cmd/_global.md"
23
26
 
27
+ ## Remarks
28
+
29
+ If the command finds multiple user custom actions with the specified title, it will prompt you to disambiguate which user custom action it should use, listing the discovered IDs.
30
+
24
31
  ## Examples
25
32
 
26
33
  Return details about the user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site or site collection _https://contoso.sharepoint.com/sites/test_
@@ -29,6 +36,12 @@ Return details about the user custom action with ID _058140e3-0e37-44fc-a1d3-79c
29
36
  m365 spo customaction get --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --url https://contoso.sharepoint.com/sites/test
30
37
  ```
31
38
 
39
+ Return details about the user custom action with Title _YourAppCustomizer_ located in site or site collection _https://contoso.sharepoint.com/sites/test_
40
+
41
+ ```sh
42
+ m365 spo customaction get --title "YourAppCustomizer" --url https://contoso.sharepoint.com/sites/test
43
+ ```
44
+
32
45
  Return details about the user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site collection _https://contoso.sharepoint.com/sites/test_
33
46
 
34
47
  ```sh
@@ -10,8 +10,11 @@ m365 spo customaction remove [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-i, --id <id>`
14
- : Id (GUID) of the custom action to remove
13
+ `-i, --id [id]`
14
+ : Id (GUID) of the custom action to remove. Specify either `id` or `title`
15
+
16
+ `-t, --title [title]`
17
+ : Title of the user custom action to retrieve information for. Specify either `id` or `title`
15
18
 
16
19
  `-u, --url <url>`
17
20
  : Url of the site or site collection to remove the custom action from
@@ -24,6 +27,10 @@ m365 spo customaction remove [options]
24
27
 
25
28
  --8<-- "docs/cmd/_global.md"
26
29
 
30
+ ## Remarks
31
+
32
+ If the command finds multiple user custom actions with the specified title, it will prompt you to disambiguate which user custom action it should use, listing the discovered IDs.
33
+
27
34
  ## Examples
28
35
 
29
36
  Removes user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site or site collection _https://contoso.sharepoint.com/sites/test_
@@ -32,24 +39,48 @@ Removes user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ locate
32
39
  m365 spo customaction remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --url https://contoso.sharepoint.com/sites/test
33
40
  ```
34
41
 
42
+ Removes user custom action with Title _YourAppCustomizer_ located in site or site collection _https://contoso.sharepoint.com/sites/test_
43
+
44
+ ```sh
45
+ m365 spo customaction remove --title "YourAppCustomizer" --url https://contoso.sharepoint.com/sites/test
46
+ ```
47
+
35
48
  Removes user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site or site collection _https://contoso.sharepoint.com/sites/test_. Skips the confirmation prompt message.
36
49
 
37
50
  ```sh
38
51
  m365 spo customaction remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --url https://contoso.sharepoint.com/sites/test --confirm
39
52
  ```
40
53
 
54
+ Removes user custom action with Title _YourAppCustomizer_ located in site or site collection _https://contoso.sharepoint.com/sites/test_. Skips the confirmation prompt message.
55
+
56
+ ```sh
57
+ m365 spo customaction remove --title "YourAppCustomizer" --url https://contoso.sharepoint.com/sites/test --confirm
58
+ ```
59
+
41
60
  Removes user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site collection _https://contoso.sharepoint.com/sites/test_
42
61
 
43
62
  ```sh
44
63
  m365 spo customaction remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --url https://contoso.sharepoint.com/sites/test --scope Site
45
64
  ```
46
65
 
66
+ Removes user custom action with Title _YourAppCustomizer_ located in site collection _https://contoso.sharepoint.com/sites/test_
67
+
68
+ ```sh
69
+ m365 spo customaction remove --title "YourAppCustomizer" --url https://contoso.sharepoint.com/sites/test --scope Site
70
+ ```
71
+
47
72
  Removes user custom action with ID _058140e3-0e37-44fc-a1d3-79c487d371a3_ located in site _https://contoso.sharepoint.com/sites/test_
48
73
 
49
74
  ```sh
50
75
  m365 spo customaction remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --url https://contoso.sharepoint.com/sites/test --scope Web
51
76
  ```
52
77
 
78
+ Removes user custom action with Title _YourAppCustomizer_ located in site _https://contoso.sharepoint.com/sites/test_
79
+
80
+ ```sh
81
+ m365 spo customaction remove --title "YourAppCustomizer" --url https://contoso.sharepoint.com/sites/test --scope Web
82
+ ```
83
+
53
84
  ## More information
54
85
 
55
86
  - UserCustomAction REST API resources: [https://msdn.microsoft.com/en-us/library/office/dn531432.aspx#bk_UserCustomAction](https://msdn.microsoft.com/en-us/library/office/dn531432.aspx#bk_UserCustomAction)
@@ -23,10 +23,13 @@ m365 spo field get [options]
23
23
  : Server- or web-relative URL of the list where the field is located. Specify only one of listTitle, listId or listUrl
24
24
 
25
25
  `-i, --id [id]`
26
- : The ID of the field to retrieve. Specify id or fieldTitle but not both
26
+ : The ID of the field to retrieve. Specify id or title but not both
27
27
 
28
28
  `--fieldTitle [fieldTitle]`
29
- : The display name (case-sensitive) of the field to retrieve. Specify id or fieldTitle but not both
29
+ : (deprecated. Use `title` instead) The display name (case-sensitive) of the field to retrieve. Specify id or fieldTitle but not both
30
+
31
+ `-t, --title [title]`
32
+ : The display name (case-sensitive) of the field to remove. Specify id or title, or group but not both
30
33
 
31
34
  --8<-- "docs/cmd/_global.md"
32
35
 
@@ -47,5 +50,5 @@ m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales -
47
50
  Retrieves list column by display name located in site _https://contoso.sharepoint.com/sites/contoso-sales_. Retrieves the list by its url
48
51
 
49
52
  ```sh
50
- m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl 'Lists/Events' --fieldTitle 'Title'
53
+ m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --title "Title"
51
54
  ```
@@ -23,13 +23,16 @@ m365 spo field remove [options]
23
23
  : Server- or web-relative URL of the list where the field is located. Specify only one of `listTitle`, `listId` or `listUrl`
24
24
 
25
25
  `-i, --id [id]`
26
- : The ID of the field to remove. Specify id, fieldTitle, or group
26
+ : The ID of the field to remove. Specify id, title, or group
27
27
 
28
- `-t, --fieldTitle [fieldTitle]`
29
- : The display name (case-sensitive) of the field to remove. Specify id, fieldTitle, or group
28
+ `--fieldTitle [fieldTitle]`
29
+ : (deprecated. Use `title` instead) The display name (case-sensitive) of the field to remove. Specify id, fieldTitle, or group
30
+
31
+ `-t, --title [title]`
32
+ : The display name (case-sensitive) of the field to remove. Specify id, title, or group
30
33
 
31
34
  `-g, --group [group]`
32
- : Delete all fields from this group (case-sensitive). Specify id, fieldTitle, or group
35
+ : Delete all fields from this group (case-sensitive). Specify id, title, or group
33
36
 
34
37
  `--confirm`
35
38
  : Don't prompt for confirming removing the field
@@ -53,11 +56,11 @@ m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sale
53
56
  Remove the list column with the specified display name, located in site _https://contoso.sharepoint.com/sites/contoso-sales_. Retrieves the list by its url
54
57
 
55
58
  ```sh
56
- m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl 'Lists/Events' --fieldTitle 'Title'
59
+ m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --title "Title"
57
60
  ```
58
61
 
59
62
  Remove all site columns from group _MyGroup_
60
63
 
61
64
  ```sh
62
- m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --group 'MyGroup'
65
+ m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --group "MyGroup"
63
66
  ```
@@ -0,0 +1,43 @@
1
+ # spo file rename
2
+
3
+ Renames a file
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo file rename [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --webUrl <webUrl>`
14
+ : The URL of the site where the file is located
15
+
16
+ `-s, --sourceUrl <sourceUrl>`
17
+ : Site-relative URL of the file to rename
18
+
19
+ `-t, --targetFileName <targetFileName>`
20
+ : New file name of the file
21
+
22
+ `--force`
23
+ : If a file already exists with target file name, it will be moved to the recycle bin. If omitted, the rename operation will be canceled if a file already exists with the specified file name
24
+
25
+ --8<-- "docs/cmd/_global.md"
26
+
27
+ ## Remarks
28
+
29
+ If you try to rename a file without the `--force` flag and a file with this name already exists, the operation will be cancelled.
30
+
31
+ ## Examples
32
+
33
+ Renames a file with server-relative URL _/Shared Documents/Test1.docx_ located in site _<https://contoso.sharepoint.com/sites/project-x>_ to _Test2.docx_
34
+
35
+ ```sh
36
+ m365 spo file rename --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl '/Shared Documents/Test1.docx' --targetFileName 'Test2.docx'
37
+ ```
38
+
39
+ Renames a file with server-relative URL _/Shared Documents/Test1.docx_ located in site _<https://contoso.sharepoint.com/sites/project-x>_ to _Test2.docx_. If the file with the target file name already exists, this file will be moved to the recycle bin
40
+
41
+ ```sh
42
+ m365 spo file rename --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl '/Shared Documents/Test1.docx' --targetFileName 'Test2.docx' --force
43
+ ```
@@ -54,6 +54,9 @@ m365 spo site classic set [options]
54
54
  !!! important
55
55
  To use this command you have to have permissions to access the tenant admin site.
56
56
 
57
+ !!! important
58
+ This command is deprecated. Please use [spo site set](./site-set.md) instead.
59
+
57
60
  ## Remarks
58
61
 
59
62
  The value of the `--resourceQuota` option must not exceed the company's aggregate available Sandboxed Solutions quota. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010: [http://msdn.microsoft.com/en-us/library/gg615462.aspx](http://msdn.microsoft.com/en-us/library/gg615462.aspx).
@@ -13,6 +13,12 @@ m365 spo site set [options]
13
13
  `-u, --url <url>`
14
14
  : The URL of the site collection to update
15
15
 
16
+ `-t, --title [title]`
17
+ : The new title for the site collection
18
+
19
+ `-d, --description [description]`
20
+ : The site description
21
+
16
22
  `--classification [classification]`
17
23
  : The new classification for the site collection
18
24
 
@@ -31,18 +37,36 @@ m365 spo site set [options]
31
37
  `--siteDesignId [siteDesignId]`
32
38
  : Id of the custom site design to apply to the site
33
39
 
34
- `--title [title]`
35
- : The new title for the site collection
36
-
37
- `--description [description]`
38
- : The site description
39
-
40
40
  `--sharingCapability [sharingCapability]`
41
41
  : The sharing capability for the site. Allowed values: `Disabled`, `ExternalUserSharingOnly`, `ExternalUserAndGuestSharing`, `ExistingExternalUserSharingOnly`.
42
42
 
43
43
  `--siteLogoUrl [siteLogoUrl]`
44
44
  : Set the logo for the site collection. This can be an absolute or relative URL to a file on the current site collection.
45
45
 
46
+ `--resourceQuota [resourceQuota]`
47
+ : The quota for this site collection in Sandboxed Solutions units
48
+
49
+ `--resourceQuotaWarningLevel [resourceQuotaWarningLevel]`
50
+ : The warning level for the resource quota
51
+
52
+ `--storageQuota [storageQuota]`
53
+ : The storage quota for this site collection in megabytes
54
+
55
+ `--storageQuotaWarningLevel [storageQuotaWarningLevel]`
56
+ : The warning level for the storage quota in megabytes
57
+
58
+ `--allowSelfServiceUpgrade [allowSelfServiceUpgrade]`
59
+ : Set to allow tenant administrators to upgrade the site collection
60
+
61
+ `--lockState [lockState]`
62
+ : Sets site's lock state. Allowed values `Unlock,NoAdditions,ReadOnly,NoAccess`
63
+
64
+ `--noScriptSite [noScriptSite]`
65
+ : Specifies if the site allows custom script or not
66
+
67
+ `--wait`
68
+ : Wait for the settings to be applied before completing the command
69
+
46
70
  --8<-- "docs/cmd/_global.md"
47
71
 
48
72
  !!! important
@@ -56,6 +80,20 @@ The `isPublic` property can be set only on groupified site collections. If you t
56
80
 
57
81
  When setting owners, the specified owners will be added to the already configured owners. Existing owners will not be removed.
58
82
 
83
+ The value of the `--resourceQuota` option must not exceed the company's aggregate available Sandboxed Solutions quota. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010: [http://msdn.microsoft.com/en-us/library/gg615462.aspx](http://msdn.microsoft.com/en-us/library/gg615462.aspx).
84
+
85
+ The value of the `--resourceQuotaWarningLevel` option must not exceed the value of the `--resourceQuota` option or the current value of the _UserCodeMaximumLevel_ property.
86
+
87
+ The value of the `--storageQuota` option must not exceed the company's available quota.
88
+
89
+ The value of the `--storageQuotaWarningLevel` option must not exceed the the value of the `--storageQuota` option or the current value of the _StorageMaximumLevel_ property.
90
+
91
+ For more information on locking sites see [https://technet.microsoft.com/en-us/library/cc263238.aspx](https://technet.microsoft.com/en-us/library/cc263238.aspx).
92
+
93
+ For more information on configuring no script sites see [https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f](https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f).
94
+
95
+ Setting site properties is by default asynchronous and depending on the current state of Microsoft 365, might take up to few minutes. If you're building a script with steps that require the site to be fully configured, you should use the `--wait` flag. When using this flag, the `spo site set` command will keep running until it received confirmation from Microsoft 365 that the site has been fully configured.
96
+
59
97
  ## Examples
60
98
 
61
99
  Update site collection's classification
@@ -129,3 +167,9 @@ Unset the logo on the site
129
167
  ```sh
130
168
  m365 spo site set --url https://estruyfdev2.sharepoint.com/sites/sales --siteLogoUrl ""
131
169
  ```
170
+
171
+ Lock the site preventing users from accessing it. Wait for the configuration to complete
172
+
173
+ ```sh
174
+ m365 spo site set --url https://contoso.sharepoint.com/sites/team --LockState NoAccess --wait
175
+ ```
@@ -22,10 +22,10 @@ m365 teams tab get [options]
22
22
  `--channelName [channelName]`
23
23
  : The display name of the Microsoft Teams channel where the tab is located. Specify either channelId or channelName but not both
24
24
 
25
- `--tabId [tabId]`
25
+ `-i, --tabId [tabId]`
26
26
  : The ID of the Microsoft Teams tab. Specify either tabId or tabName but not both
27
27
 
28
- `--tabName [tabName]`
28
+ `-n, --tabName [tabName]`
29
29
  : The display name of the Microsoft Teams tab. Specify either tabId or tabName but not both
30
30
 
31
31
  --8<-- "docs/cmd/_global.md"
@@ -10,11 +10,17 @@ m365 teams team clone [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-i, --teamId <teamId>`
13
+ `-i, --id [id]`
14
14
  : The ID of the Microsoft Teams team to clone
15
15
 
16
- `-n, --displayName <displayName>`
17
- : The display name for the new Microsoft Teams Team
16
+ `--teamId [teamId]`
17
+ : (deprecated. Use `id` instead) The ID of the Microsoft Teams team to clone
18
+
19
+ `-n, --name [name]`
20
+ : The display name for the new Microsoft Teams Team to clone
21
+
22
+ `--displayName [displayName]`
23
+ : (deprecated. Use `name` instead) The display name for the new Microsoft Teams Team to clone
18
24
 
19
25
  `-p, --partsToClone <partsToClone>`
20
26
  : A comma-separated list of the parts to clone. Allowed values are `apps,channels,members,settings,tabs`
@@ -41,11 +47,11 @@ When tabs are cloned, they are put into an unconfigured state. The first time yo
41
47
  Creates a clone of a Microsoft Teams team with mandatory parameters
42
48
 
43
49
  ```sh
44
- m365 teams team clone --teamId 15d7a78e-fd77-4599-97a5-dbb6372846c5 --displayName "Library Assist" --partsToClone "apps,tabs,settings,channels,members"
50
+ m365 teams team clone --id 15d7a78e-fd77-4599-97a5-dbb6372846c5 --name "Library Assist" --partsToClone "apps,tabs,settings,channels,members"
45
51
  ```
46
52
 
47
53
  Creates a clone of a Microsoft Teams team with mandatory and optional parameters
48
54
 
49
55
  ```sh
50
- m365 teams team clone --teamId 15d7a78e-fd77-4599-97a5-dbb6372846c5 --displayName "Library Assist" --partsToClone "apps,tabs,settings,channels,members" --description "Self help community for library" --classification "Library" --visibility "public"
56
+ m365 teams team clone --id 15d7a78e-fd77-4599-97a5-dbb6372846c5 --name "Library Assist" --partsToClone "apps,tabs,settings,channels,members" --description "Self help community for library" --classification "Library" --visibility "public"
51
57
  ```
@@ -10,11 +10,17 @@ m365 teams team set [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-i, --teamId <teamId>`
13
+ `-i, --id [id]`
14
14
  : The ID of the Microsoft Teams team for which to update settings
15
15
 
16
+ `--teamId [teamId]`
17
+ : (deprecated. Use `id` instead) The ID of the Microsoft Teams team for which to update settings
18
+
19
+ `-n, --name [name]`
20
+ : The display name for the Microsoft Teams team for which to update settings
21
+
16
22
  `--displayName [displayName]`
17
- : The display name for the Microsoft Teams team
23
+ : (deprecated. Use `name` instead) The display name for the Microsoft Teams team for which to update settings
18
24
 
19
25
  `--description [description]`
20
26
  : The description for the Microsoft Teams team
@@ -35,11 +41,11 @@ m365 teams team set [options]
35
41
  Set Microsoft Teams team visibility as Private
36
42
 
37
43
  ```sh
38
- m365 teams team set --teamId '00000000-0000-0000-0000-000000000000' --visibility Private
44
+ m365 teams team set --id "00000000-0000-0000-0000-000000000000" --visibility Private
39
45
  ```
40
46
 
41
47
  Set Microsoft Teams team classification as MBI
42
48
 
43
49
  ```sh
44
- m365 teams team set --teamId '00000000-0000-0000-0000-000000000000' --classification MBI
50
+ m365 teams team set --id "00000000-0000-0000-0000-000000000000" --classification MBI
45
51
  ```
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "5.5.0",
9
+ "version": "5.6.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-node": "^1.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.5.0-beta.f697eab",
3
+ "version": "5.6.0-beta.3d0b974",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",