@pnp/cli-microsoft365 6.8.0-beta.2463cfa → 6.8.0-beta.a10f6e4

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.
Files changed (67) hide show
  1. package/.mocharc.json +1 -0
  2. package/dist/m365/spo/commands/file/file-checkin.js +8 -3
  3. package/dist/m365/spo/commands/file/file-checkout.js +8 -3
  4. package/dist/m365/spo/commands/file/file-copy.js +4 -4
  5. package/dist/m365/spo/commands/file/file-get.js +3 -1
  6. package/dist/m365/spo/commands/file/file-list.js +2 -2
  7. package/dist/m365/spo/commands/file/file-move.js +6 -7
  8. package/dist/m365/spo/commands/file/file-remove.js +3 -12
  9. package/dist/m365/spo/commands/file/file-rename.js +3 -3
  10. package/dist/m365/spo/commands/file/file-roleassignment-add.js +2 -1
  11. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -3
  12. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -1
  13. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -1
  14. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -2
  15. package/dist/m365/spo/commands/file/file-version-clear.js +3 -1
  16. package/dist/m365/spo/commands/file/file-version-get.js +3 -1
  17. package/dist/m365/spo/commands/file/file-version-remove.js +3 -1
  18. package/dist/m365/spo/commands/file/file-version-restore.js +3 -1
  19. package/dist/m365/spo/commands/folder/folder-copy.js +4 -4
  20. package/dist/m365/spo/commands/folder/folder-get.js +5 -2
  21. package/dist/m365/spo/commands/folder/folder-move.js +3 -2
  22. package/dist/m365/spo/commands/folder/folder-rename.js +5 -2
  23. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +46 -1
  24. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +119 -0
  25. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +106 -0
  26. package/dist/m365/spo/commands.js +2 -0
  27. package/dist/utils/spo.js +1 -1
  28. package/docs/docs/cmd/spo/file/file-add.md +1 -1
  29. package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
  30. package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
  31. package/docs/docs/cmd/spo/file/file-copy.md +1 -1
  32. package/docs/docs/cmd/spo/file/file-get.md +1 -1
  33. package/docs/docs/cmd/spo/file/file-move.md +3 -3
  34. package/docs/docs/cmd/spo/file/file-rename.md +1 -1
  35. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.md +3 -3
  36. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.md +2 -2
  37. package/docs/docs/cmd/spo/file/file-roleassignment-add.md +1 -1
  38. package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +1 -1
  39. package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +1 -1
  40. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +1 -1
  41. package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +1 -1
  42. package/docs/docs/cmd/spo/file/file-sharinglink-add.md +1 -1
  43. package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +1 -1
  44. package/docs/docs/cmd/spo/file/file-sharinglink-get.md +1 -1
  45. package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
  46. package/docs/docs/cmd/spo/file/file-sharinglink-remove.md +1 -1
  47. package/docs/docs/cmd/spo/file/file-sharinglink-set.md +1 -1
  48. package/docs/docs/cmd/spo/file/file-version-clear.md +2 -2
  49. package/docs/docs/cmd/spo/file/file-version-get.md +1 -1
  50. package/docs/docs/cmd/spo/file/file-version-list.md +1 -1
  51. package/docs/docs/cmd/spo/file/file-version-remove.md +1 -1
  52. package/docs/docs/cmd/spo/file/file-version-restore.md +1 -1
  53. package/docs/docs/cmd/spo/folder/folder-add.md +9 -3
  54. package/docs/docs/cmd/spo/folder/folder-copy.md +1 -1
  55. package/docs/docs/cmd/spo/folder/folder-get.md +7 -7
  56. package/docs/docs/cmd/spo/folder/folder-list.md +11 -11
  57. package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
  58. package/docs/docs/cmd/spo/folder/folder-remove.md +7 -7
  59. package/docs/docs/cmd/spo/folder/folder-rename.md +11 -5
  60. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.md +3 -3
  61. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.md +1 -1
  62. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +1 -1
  63. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +4 -4
  64. package/docs/docs/cmd/spo/site/site-recyclebinitem-move.md +43 -0
  65. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.md +45 -0
  66. package/npm-shrinkwrap.json +267 -334
  67. package/package.json +12 -12
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoSiteRecycleBinItemMoveCommand_instances, _SpoSiteRecycleBinItemMoveCommand_initTelemetry, _SpoSiteRecycleBinItemMoveCommand_initOptions, _SpoSiteRecycleBinItemMoveCommand_initOptionSets, _SpoSiteRecycleBinItemMoveCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Cli_1 = require("../../../../cli/Cli");
19
+ const request_1 = require("../../../../request");
20
+ const validation_1 = require("../../../../utils/validation");
21
+ const SpoCommand_1 = require("../../../base/SpoCommand");
22
+ const commands_1 = require("../../commands");
23
+ class SpoSiteRecycleBinItemMoveCommand extends SpoCommand_1.default {
24
+ get name() {
25
+ return commands_1.default.SITE_RECYCLEBINITEM_MOVE;
26
+ }
27
+ get description() {
28
+ return 'Moves items from the first-stage recycle bin to the second-stage recycle bin';
29
+ }
30
+ constructor() {
31
+ super();
32
+ _SpoSiteRecycleBinItemMoveCommand_instances.add(this);
33
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initTelemetry).call(this);
34
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initOptions).call(this);
35
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initOptionSets).call(this);
36
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initValidators).call(this);
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (args.options.confirm) {
41
+ yield this.moveRecycleBinItem(args, logger);
42
+ }
43
+ else {
44
+ const result = yield Cli_1.Cli.prompt({
45
+ type: 'confirm',
46
+ name: 'continue',
47
+ default: false,
48
+ message: 'Are you sure you want to move these items to the second-stage recycle bin?'
49
+ });
50
+ if (result.continue) {
51
+ yield this.moveRecycleBinItem(args, logger);
52
+ }
53
+ }
54
+ });
55
+ }
56
+ moveRecycleBinItem(args, logger) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ try {
59
+ const requestOptions = {
60
+ url: `${args.options.siteUrl}/_api/web/recycleBin/MoveAllToSecondStage`,
61
+ headers: {
62
+ 'accept': 'application/json;odata=nometadata'
63
+ },
64
+ responseType: 'json'
65
+ };
66
+ if (args.options.ids !== undefined) {
67
+ const ids = args.options.ids.split(',');
68
+ if (this.verbose) {
69
+ logger.logToStderr(`Moving ${ids.length} items to the second-stage recycle bin.`);
70
+ }
71
+ requestOptions.data = {
72
+ ids: ids
73
+ };
74
+ }
75
+ else if (this.verbose) {
76
+ logger.logToStderr('Moving all items to the second-stage recycle bin.');
77
+ }
78
+ yield request_1.default.post(requestOptions);
79
+ }
80
+ catch (err) {
81
+ this.handleRejectedODataJsonPromise(err);
82
+ }
83
+ });
84
+ }
85
+ }
86
+ _SpoSiteRecycleBinItemMoveCommand_instances = new WeakSet(), _SpoSiteRecycleBinItemMoveCommand_initTelemetry = function _SpoSiteRecycleBinItemMoveCommand_initTelemetry() {
87
+ this.telemetry.push((args) => {
88
+ Object.assign(this.telemetryProperties, {
89
+ ids: typeof args.options.ids !== 'undefined',
90
+ all: !!args.options.all,
91
+ confirm: !!args.options.confirm
92
+ });
93
+ });
94
+ }, _SpoSiteRecycleBinItemMoveCommand_initOptions = function _SpoSiteRecycleBinItemMoveCommand_initOptions() {
95
+ this.options.unshift({
96
+ option: '-u, --siteUrl <siteUrl>'
97
+ }, {
98
+ option: '-i, --ids [ids]'
99
+ }, {
100
+ option: '--all'
101
+ }, {
102
+ option: '--confirm'
103
+ });
104
+ }, _SpoSiteRecycleBinItemMoveCommand_initOptionSets = function _SpoSiteRecycleBinItemMoveCommand_initOptionSets() {
105
+ this.optionSets.push({ options: ['ids', 'all'] });
106
+ }, _SpoSiteRecycleBinItemMoveCommand_initValidators = function _SpoSiteRecycleBinItemMoveCommand_initValidators() {
107
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
108
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.siteUrl);
109
+ if (isValidSharePointUrl !== true) {
110
+ return isValidSharePointUrl;
111
+ }
112
+ if (args.options.ids && !validation_1.validation.isValidGuidArray(args.options.ids.split(','))) {
113
+ return 'The option ids contains one or more invalid GUIDs';
114
+ }
115
+ return true;
116
+ }));
117
+ };
118
+ module.exports = new SpoSiteRecycleBinItemMoveCommand();
119
+ //# sourceMappingURL=site-recyclebinitem-move.js.map
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoSiteRecycleBinItemRemoveCommand_instances, _SpoSiteRecycleBinItemRemoveCommand_initTelemetry, _SpoSiteRecycleBinItemRemoveCommand_initOptions, _SpoSiteRecycleBinItemRemoveCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Cli_1 = require("../../../../cli/Cli");
19
+ const request_1 = require("../../../../request");
20
+ const validation_1 = require("../../../../utils/validation");
21
+ const SpoCommand_1 = require("../../../base/SpoCommand");
22
+ const commands_1 = require("../../commands");
23
+ class SpoSiteRecycleBinItemRemoveCommand extends SpoCommand_1.default {
24
+ get name() {
25
+ return commands_1.default.SITE_RECYCLEBINITEM_REMOVE;
26
+ }
27
+ get description() {
28
+ return 'Permanently deletes specific items from the site recycle bin';
29
+ }
30
+ constructor() {
31
+ super();
32
+ _SpoSiteRecycleBinItemRemoveCommand_instances.add(this);
33
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initTelemetry).call(this);
34
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initOptions).call(this);
35
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initValidators).call(this);
36
+ }
37
+ commandAction(logger, args) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (args.options.confirm) {
40
+ yield this.removeRecycleBinItem(args, logger);
41
+ }
42
+ else {
43
+ const result = yield Cli_1.Cli.prompt({
44
+ type: 'confirm',
45
+ name: 'continue',
46
+ default: false,
47
+ message: `Are you sure you want to permanently delete ${args.options.ids.split(',').length} item(s) from the site recycle bin?`
48
+ });
49
+ if (result.continue) {
50
+ yield this.removeRecycleBinItem(args, logger);
51
+ }
52
+ }
53
+ });
54
+ }
55
+ removeRecycleBinItem(args, logger) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ if (this.verbose) {
58
+ logger.logToStderr(`Permanently deleting items from the site recycle bin at site ${args.options.siteUrl}...`);
59
+ }
60
+ try {
61
+ const requestOptions = {
62
+ url: `${args.options.siteUrl}/_api/site/RecycleBin/DeleteByIds`,
63
+ headers: {
64
+ accept: 'application/json;odata=nometadata'
65
+ },
66
+ responseType: 'json',
67
+ data: {
68
+ ids: args.options.ids.split(',')
69
+ }
70
+ };
71
+ yield request_1.default.post(requestOptions);
72
+ }
73
+ catch (err) {
74
+ this.handleRejectedODataJsonPromise(err);
75
+ }
76
+ });
77
+ }
78
+ }
79
+ _SpoSiteRecycleBinItemRemoveCommand_instances = new WeakSet(), _SpoSiteRecycleBinItemRemoveCommand_initTelemetry = function _SpoSiteRecycleBinItemRemoveCommand_initTelemetry() {
80
+ this.telemetry.push((args) => {
81
+ Object.assign(this.telemetryProperties, {
82
+ confirm: !!args.options.confirm
83
+ });
84
+ });
85
+ }, _SpoSiteRecycleBinItemRemoveCommand_initOptions = function _SpoSiteRecycleBinItemRemoveCommand_initOptions() {
86
+ this.options.unshift({
87
+ option: '-u, --siteUrl <siteUrl>'
88
+ }, {
89
+ option: '-i, --ids <ids>'
90
+ }, {
91
+ option: '--confirm'
92
+ });
93
+ }, _SpoSiteRecycleBinItemRemoveCommand_initValidators = function _SpoSiteRecycleBinItemRemoveCommand_initValidators() {
94
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
95
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.siteUrl);
96
+ if (isValidSharePointUrl !== true) {
97
+ return isValidSharePointUrl;
98
+ }
99
+ if (!validation_1.validation.isValidGuidArray(args.options.ids.split(','))) {
100
+ return 'The option ids contains one or more invalid GUIDs.';
101
+ }
102
+ return true;
103
+ }));
104
+ };
105
+ module.exports = new SpoSiteRecycleBinItemRemoveCommand();
106
+ //# sourceMappingURL=site-recyclebinitem-remove.js.map
@@ -249,6 +249,8 @@ exports.default = {
249
249
  SITE_INPLACERECORDSMANAGEMENT_SET: `${prefix} site inplacerecordsmanagement set`,
250
250
  SITE_RECYCLEBINITEM_CLEAR: `${prefix} site recyclebinitem clear`,
251
251
  SITE_RECYCLEBINITEM_LIST: `${prefix} site recyclebinitem list`,
252
+ SITE_RECYCLEBINITEM_MOVE: `${prefix} site recyclebinitem move`,
253
+ SITE_RECYCLEBINITEM_REMOVE: `${prefix} site recyclebinitem remove`,
252
254
  SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
253
255
  SITE_REMOVE: `${prefix} site remove`,
254
256
  SITE_RENAME: `${prefix} site rename`,
package/dist/utils/spo.js CHANGED
@@ -453,7 +453,7 @@ exports.spo = {
453
453
  * Retrieves the SiteId, VroomItemId and VroomDriveId from a specific file.
454
454
  * @param webUrl Web url
455
455
  * @param fileId GUID ID of the file
456
- * @param fileUrl Decoded URL of the file
456
+ * @param fileUrl Decoded site-relative or server-relative URL of the file
457
457
  */
458
458
  getVroomFileDetails(webUrl, fileId, fileUrl) {
459
459
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ m365 spo file add [options]
14
14
  : The URL of the site where the file should be uploaded to
15
15
 
16
16
  `-f, --folder <folder>`
17
- : Site-relative or server-relative URL to the folder where the file should be uploaded
17
+ : The server- or site-relative URL to the folder where the file should be uploaded
18
18
 
19
19
  `-p, --path <path>`
20
20
  : Local path to the file to upload
@@ -14,7 +14,7 @@ m365 spo file checkin [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file checkout [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file copy [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Server-relative or absolute URL of the file.
17
+ : Site-relative, server-relative or absolute URL of the file.
18
18
 
19
19
  `-t, --targetUrl <targetUrl>`
20
20
  : Server-relative or absolute URL of the location.
@@ -14,7 +14,7 @@ m365 spo file get [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-u, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file move [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Site-relative URL of the file to move
17
+ : The server- or site-relative URL of the file to move
18
18
 
19
19
  `-t, --targetUrl <targetUrl>`
20
20
  : Server-relative URL where to move the file
@@ -36,7 +36,7 @@ When you move a file using the `spo file move` command, all of the versions are
36
36
  Move file to a document library in another site collection
37
37
 
38
38
  ```sh
39
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/
39
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /sites/test1/Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/
40
40
  ```
41
41
 
42
42
  Move file to a document library in the same site collection
@@ -54,7 +54,7 @@ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceU
54
54
  Move file to a document library in another site collection. Allow for schema mismatch
55
55
 
56
56
  ```sh
57
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
57
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /sites/test1/Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
58
58
  ```
59
59
 
60
60
 
@@ -14,7 +14,7 @@ m365 spo file rename [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Site-relative URL of the file to rename
17
+ : The server- or site-relative URL of the file to rename
18
18
 
19
19
  `-t, --targetFileName <targetFileName>`
20
20
  : New file name of the file
@@ -11,10 +11,10 @@ m365 spo file retentionlabel ensure [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the retentionlabel from a file to apply is located
14
+ : URL of the site where the retention label from a file to apply is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The site- or server relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
17
+ : The site- or server-relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
@@ -29,7 +29,7 @@ m365 spo file retentionlabel ensure [options]
29
29
 
30
30
  ## Remarks
31
31
 
32
- You can also use [spo listitem retentionlabel remove](./../../../cmd/spo//listitem/listitem-retentionlabel-remove.md) for removing the retentionlabel from a listitem.
32
+ You can also use [spo listitem retentionlabel remove](./../../../cmd/spo//listitem/listitem-retentionlabel-remove.md) for removing the retention label from a listitem.
33
33
 
34
34
  The `--assetId` option has to do with event-based retention. Event-based retention is about starting a retention period when a specific event occurs, instead of the moment a document was labeled or created.
35
35
 
@@ -11,10 +11,10 @@ m365 spo file retentionlabel remove [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the retentionlabel from a file to remove is located
14
+ : URL of the site where the retention label from a file to remove is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The site- or server relative URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleassignment add [options]
14
14
  : URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleassignment remove [options]
14
14
  : URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleinheritance break [options]
14
14
  : URL of the site where the file is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file roleinheritance reset [options]
14
14
  : URL of the site where the file is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file sharinginfo get [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --fileUrl [fileUrl]`
17
- : The server-relative URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file sharinglink add [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink clear [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink get [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink list [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink remove [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink set [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,10 +14,10 @@ m365 spo file version clear [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-u, --fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `-i, --fileId [fileId]`
20
- : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
20
+ : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `--confirm [confirm]`
23
23
  : Don't prompt for confirmation.
@@ -17,7 +17,7 @@ m365 spo file version get [options]
17
17
  : Label of version which will be retrieved
18
18
 
19
19
  `-u, --fileUrl [fileUrl]`
20
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file version list [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-u, --fileUrl [fileUrl]`
17
- : The site-relative or server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -17,7 +17,7 @@ m365 spo file version remove [options]
17
17
  : Label of version which will be removed
18
18
 
19
19
  `-u, --fileUrl [fileUrl]`
20
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -17,7 +17,7 @@ m365 spo file version restore [options]
17
17
  : Label of version which will be restored
18
18
 
19
19
  `-u, --fileUrl [fileUrl]`
20
- : The server-relative URL of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative URL of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
@@ -11,10 +11,10 @@ m365 spo folder add [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : The URL of the site where the folder will be created
14
+ : The URL of the site where the folder will be created.
15
15
 
16
16
  `-p, --parentFolderUrl <parentFolderUrl>`
17
- : Site-relative URL of the parent folder
17
+ : The server- or site-relative URL of the parent folder.
18
18
 
19
19
  `-n, --name <name>`
20
20
  : Name of the new folder to be created
@@ -23,8 +23,14 @@ m365 spo folder add [options]
23
23
 
24
24
  ## Examples
25
25
 
26
- Creates folder in a parent folder with site relative url _/Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
26
+ Creates folder in a specific library within the site
27
27
 
28
28
  ```sh
29
29
  m365 spo folder add --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/Shared Documents' --name 'My Folder Name'
30
30
  ```
31
+
32
+ Creates folder in a specific folder within the site
33
+
34
+ ```sh
35
+ m365 spo folder add --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/sites/project-x/Shared Documents/Reports' --name 'Financial reports'
36
+ ```
@@ -14,7 +14,7 @@ m365 spo folder copy [options]
14
14
  : The URL of the site where the folder is located
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Site-relative URL of the folder to copy
17
+ : The server- or site-relative URL of the folder to copy
18
18
 
19
19
  `-t, --targetUrl <targetUrl>`
20
20
  : Server-relative URL where to copy the folder
@@ -11,13 +11,13 @@ m365 spo folder get [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : The URL of the site where the folder is located
14
+ : The URL of the site where the folder is located.
15
15
 
16
16
  `-f, --url [url]`
17
- : The server-relative URL of the folder to retrieve. Specify either `folderUrl` or `id` but not both
17
+ : The server- or site-relative URL of the folder to retrieve. Specify either `folderUrl` or `id` but not both.
18
18
 
19
19
  `-i, --id [id]`
20
- : The UniqueId (GUID) of the folder to retrieve. Specify either `url` or `id` but not both
20
+ : The UniqueId (GUID) of the folder to retrieve. Specify either `url` or `id` but not both.
21
21
 
22
22
  `--withPermissions`
23
23
  : Set if you want to return associated roles and permissions of the folder.
@@ -32,20 +32,20 @@ If root level folder is passed, you will get a `Please ensure the specified fold
32
32
 
33
33
  ## Examples
34
34
 
35
- Get folder properties for folder with server-relative url _'/Shared Documents'_ located in site _https://contoso.sharepoint.com/sites/project-x_
35
+ Get folder properties for a folder with a specific site-relative URL
36
36
 
37
37
  ```sh
38
38
  m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/project-x --url "/Shared Documents"
39
39
  ```
40
40
 
41
- Get folder properties for folder with id (UniqueId) _b2307a39-e878-458b-bc90-03bc578531d6_ located in site _https://contoso.sharepoint.com/sites/project-x_
41
+ Get folder properties for a folder with a specific id (UniqueId)
42
42
 
43
43
  ```sh
44
44
  m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/project-x --id "b2307a39-e878-458b-bc90-03bc578531d6"
45
45
  ```
46
46
 
47
- Get folder properties for folder with server-relative url _'/Shared Documents/Test1'_ located in site _https://contoso.sharepoint.com/sites/test
47
+ Get folder properties with permissions for a folder with server-relative URL
48
48
 
49
49
  ```sh
50
- m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/test --url "Shared Documents/Test1" --withPermissions
50
+ m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/test --url "/sites/test/Shared Documents/Test1" --withPermissions
51
51
  ```