@pnp/cli-microsoft365 6.1.0-beta.4fefcde → 6.1.0-beta.6108255

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 (28) hide show
  1. package/dist/m365/aad/commands/group/group-get.js +79 -0
  2. package/dist/m365/aad/commands/user/user-set.js +84 -11
  3. package/dist/m365/aad/commands.js +1 -0
  4. package/dist/m365/base/ContextCommand.js +33 -0
  5. package/dist/m365/context/commands/context-init.js +28 -0
  6. package/dist/m365/context/commands/context-remove.js +103 -0
  7. package/dist/m365/context/commands.js +8 -0
  8. package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +142 -0
  9. package/dist/m365/purview/commands.js +2 -1
  10. package/dist/m365/spo/commands/group/group-member-add.js +68 -30
  11. package/dist/m365/spo/commands/group/group-member-remove.js +50 -7
  12. package/dist/m365/spo/commands/list/{list-retentionlabel-set.js → list-retentionlabel-ensure.js} +21 -15
  13. package/dist/m365/spo/commands/listitem/listitem-remove.js +1 -1
  14. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +143 -0
  15. package/dist/m365/spo/commands.js +2 -1
  16. package/dist/request.js +2 -1
  17. package/docs/docs/cmd/aad/group/group-get.md +127 -0
  18. package/docs/docs/cmd/aad/user/user-set.md +31 -3
  19. package/docs/docs/cmd/context/context-init.md +25 -0
  20. package/docs/docs/cmd/context/context-remove.md +34 -0
  21. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +63 -0
  22. package/docs/docs/cmd/spo/group/group-member-add.md +58 -6
  23. package/docs/docs/cmd/spo/group/group-member-remove.md +24 -8
  24. package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.md +65 -0
  25. package/docs/docs/cmd/spo/listitem/listitem-remove.md +6 -6
  26. package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.md +55 -0
  27. package/package.json +1 -1
  28. package/docs/docs/cmd/spo/list/list-retentionlabel-set.md +0 -65
@@ -0,0 +1,127 @@
1
+ # aad group get
2
+
3
+ Gets information about the specified Azure AD Group
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 aad group get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id [id]`
14
+ : The object Id of the Azure AD group. Specify either `id` or `title` but not both
15
+
16
+ `-t, --title [title]`
17
+ : The display name of the Azure AD group. Specify either `id` or `title` but not both
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ Get information about an Azure AD Group by id
24
+
25
+ ```sh
26
+ m365 aad group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
27
+ ```
28
+
29
+ Get information about an Azure AD Group by title
30
+
31
+ ```sh
32
+ m365 aad group get --title "Finance"
33
+ ```
34
+
35
+ ## Response
36
+
37
+ === "JSON"
38
+
39
+ ```json
40
+ {
41
+ "id": "c541afac-508e-40c7-8880-5a601b41737b",
42
+ "deletedDateTime": null,
43
+ "classification": null,
44
+ "createdDateTime": "2022-11-13T19:16:32Z",
45
+ "creationOptions": [
46
+ "YammerProvisioning"
47
+ ],
48
+ "description": "This is the default group for everyone in the network",
49
+ "displayName": "All Company",
50
+ "expirationDateTime": null,
51
+ "groupTypes": [
52
+ "Unified"
53
+ ],
54
+ "isAssignableToRole": null,
55
+ "mail": "allcompany@contoso.onmicrosoft.com",
56
+ "mailEnabled": true,
57
+ "mailNickname": "allcompany",
58
+ "membershipRule": null,
59
+ "membershipRuleProcessingState": null,
60
+ "onPremisesDomainName": null,
61
+ "onPremisesLastSyncDateTime": null,
62
+ "onPremisesNetBiosName": null,
63
+ "onPremisesSamAccountName": null,
64
+ "onPremisesSecurityIdentifier": null,
65
+ "onPremisesSyncEnabled": null,
66
+ "preferredDataLocation": null,
67
+ "preferredLanguage": null,
68
+ "proxyAddresses": [
69
+ "SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac",
70
+ "SMTP:allcompany@contoso.onmicrosoft.com"
71
+ ],
72
+ "renewedDateTime": "2022-11-13T19:16:32Z",
73
+ "resourceBehaviorOptions": [
74
+ "CalendarMemberReadOnly"
75
+ ],
76
+ "resourceProvisioningOptions": [],
77
+ "securityEnabled": false,
78
+ "securityIdentifier": "S-1-12-1-4076547856-1079300050-1399127439-2879739702",
79
+ "theme": null,
80
+ "visibility": "Public",
81
+ "onPremisesProvisioningErrors": []
82
+ }
83
+ ```
84
+
85
+ === "Text"
86
+
87
+ ```text
88
+ classification : null
89
+ createdDateTime : 2022-11-13T19:16:32Z
90
+ creationOptions : ["YammerProvisioning"]
91
+ deletedDateTime : null
92
+ description : This is the default group for everyone in the network
93
+ displayName : All Company
94
+ expirationDateTime : null
95
+ groupTypes : ["Unified"]
96
+ id : c541afac-508e-40c7-8880-5a601b41737b
97
+ isAssignableToRole : null
98
+ mail : allcompany@contoso.onmicrosoft.com
99
+ mailEnabled : true
100
+ mailNickname : allcompany
101
+ membershipRule : null
102
+ membershipRuleProcessingState: null
103
+ onPremisesDomainName : null
104
+ onPremisesLastSyncDateTime : null
105
+ onPremisesNetBiosName : null
106
+ onPremisesProvisioningErrors : []
107
+ onPremisesSamAccountName : null
108
+ onPremisesSecurityIdentifier : null
109
+ onPremisesSyncEnabled : null
110
+ preferredDataLocation : null
111
+ preferredLanguage : null
112
+ proxyAddresses : ["SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac","SMTP:allcompany@contoso.onmicrosoft.com"]
113
+ renewedDateTime : 2022-11-13T19:16:32Z
114
+ resourceBehaviorOptions : ["CalendarMemberReadOnly"]
115
+ resourceProvisioningOptions : []
116
+ securityEnabled : false
117
+ securityIdentifier : S-1-12-1-4076547856-1079300050-1399127439-2879739702
118
+ theme : null
119
+ visibility : Public
120
+ ```
121
+
122
+ === "CSV"
123
+
124
+ ```csv
125
+ id,deletedDateTime,classification,createdDateTime,creationOptions,description,displayName,expirationDateTime,groupTypes,isAssignableToRole,mail,mailEnabled,mailNickname,membershipRule,membershipRuleProcessingState,onPremisesDomainName,onPremisesLastSyncDateTime,onPremisesNetBiosName,onPremisesSamAccountName,onPremisesSecurityIdentifier,onPremisesSyncEnabled,preferredDataLocation,preferredLanguage,proxyAddresses,renewedDateTime,resourceBehaviorOptions,resourceProvisioningOptions,securityEnabled,securityIdentifier,theme,visibility,onPremisesProvisioningErrors
126
+ c541afac-508e-40c7-8880-5a601b41737b,,,2022-11-13T19:16:32Z,"[""YammerProvisioning""]",This is the default group for everyone in the network,All Company,,"[""Unified""]",,allcompany@contoso.onmicrosoft.com,1,allcompany,,,,,,,,,,,"[""SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac"",""SMTP:allcompany@contoso.onmicrosoft.com""]",2022-11-13T19:16:32Z,"[""CalendarMemberReadOnly""]",[],,S-1-12-1-4076547856-1079300050-1399127439-2879739702,,Public,[]
127
+ ```
@@ -11,13 +11,25 @@ m365 aad user set [options]
11
11
  ## Options
12
12
 
13
13
  `-i, --objectId [objectId]`
14
- : The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both
14
+ : The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both.
15
15
 
16
16
  `-n, --userPrincipalName [userPrincipalName]`
17
- : User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both
17
+ : User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both.
18
18
 
19
19
  `--accountEnabled [accountEnabled]`
20
- : Boolean value specifying whether the account is enabled. Valid values are `true,false`
20
+ : Boolean value specifying whether the account is enabled. Valid values are `true` or `false`.
21
+
22
+ `--resetPassword`
23
+ : If specified, the password of the user will be reset. This will make the parameter `newPassword` required.
24
+
25
+ `--forceChangePasswordNextSignIn`
26
+ : If specified, the user will have to change his password the next time they log in. Can only be set in combination with `resetPassword`.
27
+
28
+ `--currentPassword [currentPassword]`
29
+ : Current password of the user that is signed in. If this parameter is set, `newPassword` is mandatory. Can't be combined with `resetPassword`.
30
+
31
+ `--newPassword [newPassword]`
32
+ : New password to be set. Must be set when specifying either `resetPassword` or `currentPassword`.
21
33
 
22
34
  --8<-- "docs/cmd/_global.md"
23
35
 
@@ -58,3 +70,19 @@ Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
58
70
  ```sh
59
71
  m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
60
72
  ```
73
+
74
+ Reset password of a given user by userPrincipalName and require the user to change the password on the next sign in
75
+
76
+ ```sh
77
+ m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --resetPassword --password 6NLUId79Lc24 --forceChangePasswordNextSignIn
78
+ ```
79
+
80
+ Change password of the currently logged in user
81
+
82
+ ```sh
83
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --currentPassword SLBF5gnRtyYc --newPassword 6NLUId79Lc24
84
+ ```
85
+
86
+ ### Response
87
+
88
+ The command won't return a response on success.
@@ -0,0 +1,25 @@
1
+ # context init
2
+
3
+ Initiates CLI for Microsoft 365 context in the current working folder
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 context init [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ --8<-- "docs/cmd/_global.md"
14
+
15
+ ## Examples
16
+
17
+ Initiates CLI for Microsoft 365 context in the current working folder
18
+
19
+ ```sh
20
+ m365 context init
21
+ ```
22
+
23
+ ## Response
24
+
25
+ The command won't return a response on success.
@@ -0,0 +1,34 @@
1
+ # context remove
2
+
3
+ Removes the CLI for Microsoft 365 context in the current working folder
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 context remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--confirm`
14
+ : Don't prompt for confirmation to remove the context
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Examples
19
+
20
+ Removes the CLI for Microsoft 365 context in the current working folder
21
+
22
+ ```sh
23
+ m365 context remove
24
+ ```
25
+
26
+ Removes the CLI for Microsoft 365 context in the current working folder and does not prompt for confirmation before deleting.
27
+
28
+ ```sh
29
+ m365 context remove --confirm
30
+ ```
31
+
32
+ ## Response
33
+
34
+ The command won't return a response on success.
@@ -0,0 +1,63 @@
1
+ # purview retentionlabel set
2
+
3
+ Update a retention label
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 purview retentionlabel set [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id <id>`
14
+ : The Id of the retention label.
15
+
16
+ `--behaviorDuringRetentionPeriod [behaviorDuringRetentionPeriod]`
17
+ : Specifies how the behavior of a document with this label should be during the retention period. Allowed values: `doNotRetain`, `retain`, `retainAsRecord`, `retainAsRegulatoryRecord`.
18
+
19
+ `--actionAfterRetentionPeriod [actionAfterRetentionPeriod]`
20
+ : Specifies the action to take on a document with this label applied after the retention period. Allowed values: `none`, `delete`, `startDispositionReview`.
21
+
22
+ `--retentionDuration [retentionDuration]`
23
+ : The number of days to retain the content.
24
+
25
+ `-t, --retentionTrigger [retentionTrigger]`
26
+ : Specifies whether the retention duration is calculated from the content creation date, labeled date, or last modification date. Allowed values: `dateLabeled`, `dateCreated`, `dateModified`, `dateOfEvent`.
27
+
28
+ `--defaultRecordBehavior [defaultRecordBehavior]`
29
+ : Specifies the locked or unlocked state of a record label when it is created. Allowed values: `startLocked`, `startUnlocked`.
30
+
31
+ `--descriptionForUsers [descriptionForUsers]`
32
+ : The label information for the user.
33
+
34
+ `--descriptionForAdmins [descriptionForAdmins]`
35
+ : The label information for the admin.
36
+
37
+ `--labelToBeApplied [labelToBeApplied]`
38
+ : Specifies the replacement label to be applied automatically after the retention period of the current label ends.
39
+
40
+ --8<-- "docs/cmd/_global.md"
41
+
42
+ ## Examples
43
+
44
+ Update a retention label so that it retains documents as records and deletes them after one year.
45
+
46
+ ```sh
47
+ m365 purview retentionlabel set --id c37d695e-d581-4ae9-82a0-9364eba4291e --behaviorDuringRetentionPeriod retainAsRecord --actionAfterRetentionPeriod delete --retentionDuration 365
48
+ ```
49
+
50
+ Update a retention label so that it retains documents as regulatory records and starts a disposition review one year after the last modification date.
51
+
52
+ ```sh
53
+ m365 purview retentionlabel set --id c37d695e-d581-4ae9-82a0-9364eba4291e --behaviorDuringRetentionPeriod retainAsRegulatoryRecord --actionAfterRetentionPeriod startDispositionReview --retentionDuration 365 --retentionTrigger dateModified
54
+ ```
55
+
56
+ ## Remarks
57
+
58
+ !!! attention
59
+ This command is based on a Microsoft Graph API that is currently in preview and is subject to change once the API reached general availability.
60
+
61
+ ## Response
62
+
63
+ The command won't return a response on success.
@@ -20,10 +20,13 @@ m365 spo group member add [options]
20
20
  : Name of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName`
21
21
 
22
22
  `--userName [userName]`
23
- : User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `email`
23
+ : User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName`, `email` or `userId`
24
24
 
25
25
  `--email [email]`
26
- : User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `email`
26
+ : User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName`, `email` or `userId`
27
+
28
+ `--userId [userId]`
29
+ : The user Id of the user to add as a member. (Id of the site user, for example: 14) If multiple users need to be added, the Id's have to be comma separated. Specify either `userName`, `email` or `userId`
27
30
 
28
31
  --8<-- "docs/cmd/_global.md"
29
32
 
@@ -33,26 +36,75 @@ For the `--userName` or `--email` options you can specify multiple values by sep
33
36
 
34
37
  ## Examples
35
38
 
36
- Add a user with name _Alex.Wilber@contoso.com_ to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
39
+ Add a user with the userName parameter to a SharePoint group with the groupId parameter
37
40
 
38
41
  ```sh
39
42
  m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com"
40
43
  ```
41
44
 
42
- Add multiple users by name to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
45
+ Add multiple users with the userName parameter to a SharePoint group with the groupId parameter
43
46
 
44
47
  ```sh
45
48
  m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
46
49
  ```
47
50
 
48
- Add a user with email _Alex.Wilber@contoso.com_ to the SharePoint group with name _Contoso Site Owners_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
51
+ Add a user with the email parameter to a SharePoint group with the groupName parameter
49
52
 
50
53
  ```sh
51
54
  m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com"
52
55
  ```
53
56
 
54
- Add multiple users by email to the SharePoint group with name _Contoso Site Owners_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
57
+ Add multiple users with the email parameter to a SharePoint group with the groupName parameter
55
58
 
56
59
  ```sh
57
60
  m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
58
61
  ```
62
+
63
+ Add a user with the userId parameter to a SharePoint group with the groupId parameter
64
+
65
+ ```sh
66
+ m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userId 5
67
+ ```
68
+
69
+ Add multiple users with the userId parameter to a SharePoint group with the groupId parameter
70
+
71
+ ```sh
72
+ m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userId "5,12"
73
+ ```
74
+
75
+ ## Response
76
+
77
+ === "JSON"
78
+
79
+ ```json
80
+ [
81
+ {
82
+ "AllowedRoles": [
83
+ 0
84
+ ],
85
+ "CurrentRole": 0,
86
+ "DisplayName": "John Doe",
87
+ "Email": "john.doe@contoso.onmicrosoft.com",
88
+ "InvitationLink": null,
89
+ "IsUserKnown": true,
90
+ "Message": null,
91
+ "Status": true,
92
+ "User": "i:0#.f|membership|john.doe@contoso.onmicrosoft.com"
93
+ }
94
+ ]
95
+ ```
96
+
97
+ === "Text"
98
+
99
+ ```text
100
+ DisplayName Email
101
+ ----------- ---------------------------------
102
+ John Doe john.doe@contoso.onmicrosoft.com
103
+ ```
104
+
105
+ === "CSV"
106
+
107
+ ```csv
108
+ DisplayName,Email
109
+ John Doe,john.doe@contoso.onmicrosoft.com
110
+ ```
@@ -11,29 +11,45 @@ m365 spo group member remove [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the SharePoint group is available
14
+ : URL of the site where the SharePoint group is available.
15
15
 
16
16
  `--groupId [groupId]`
17
- : Id of the SharePoint group from which the user has to be removed. Specify either `groupName` or `groupId`, but not both
17
+ : Id of the SharePoint group from which the user has to be removed. Specify either `groupName` or `groupId`, but not both.
18
18
 
19
19
  `--groupName [groupName]`
20
- : Name of the SharePoint group from which user has to be removed. Specify either `groupName` or `groupId`, but not both
20
+ : Name of the SharePoint group from which user has to be removed. Specify either `groupName` or `groupId`, but not both.
21
21
 
22
- `--userName <userName>`
23
- : The UPN of the user that needs to be removed (user principal name, eg. megan.bowen@contoso.com)
22
+ `--userName [userName]`
23
+ : The UPN (user principal name, eg. megan.bowen@contoso.com) of the user that needs to be removed. Specify either `userName`, `email`, or `userId`, but not multiple.
24
+
25
+ `--email [email]`
26
+ : The email of the user to remove as a member. Specify either `userName`, `email`, or `userId`, but not multiple.
27
+
28
+ `--userId [userId]`
29
+ : The user Id (Id of the site user, eg. 14) of the user to remove as a member. Specify either `userName`, `email`, or `userId`, but not multiple.
24
30
 
25
31
  --8<-- "docs/cmd/_global.md"
26
32
 
27
33
  ## Examples
28
34
 
29
- Remove a user from SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
35
+ Remove a user from a SharePoint group by userName.
30
36
 
31
37
  ```sh
32
38
  m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com"
33
39
  ```
34
40
 
35
- Remove a user from SharePoint group with Name _Site A Visitors_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
41
+ Remove a user from a SharePoint group by email.
42
+
43
+ ```sh
44
+ m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --email "Alex.Wilber@contoso.com"
45
+ ```
46
+
47
+ Remove a user from a SharePoint group by id.
36
48
 
37
49
  ```sh
38
- m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --userName "Alex.Wilber@contoso.com"
50
+ m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --userId 14
39
51
  ```
52
+
53
+ ## Response
54
+
55
+ The command won't return a response on success.
@@ -0,0 +1,65 @@
1
+ # spo list retentionlabel ensure
2
+
3
+ Sets a default retention label on the specified list or library.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo list retentionlabel ensure [options]
9
+ ```
10
+
11
+ ## Alias
12
+
13
+ ```sh
14
+ m365 spo list label set [options]
15
+ ```
16
+
17
+ ## Options
18
+
19
+ `-u, --webUrl <webUrl>`
20
+ : The URL of the site where the list is located.
21
+
22
+ `--label <label>`
23
+ : The label to set on the list.
24
+
25
+ `-t, --listTitle [listTitle]`
26
+ : The title of the list on which to set the label. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
27
+
28
+ `-l, --listId [listId]`
29
+ : The ID of the list on which to set the label. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
30
+
31
+ `--listUrl [listUrl]`
32
+ : Server- or web-relative URL of the list on which to set the label. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
33
+
34
+ `--syncToItems`
35
+ : Specify, to set the label on all existing items in the list.
36
+
37
+ `--blockDelete`
38
+ : (deprecated) Specify, to disallow deleting items in the list.
39
+
40
+ `--blockEdit`
41
+ : (deprecated) Specify, to disallow editing items in the list.
42
+
43
+ --8<-- "docs/cmd/_global.md"
44
+
45
+ ## Remarks
46
+
47
+ A list retention label is a default label that will be applied to all new items in the list. If you specify `syncToItems`, it is also synced to existing items.
48
+
49
+ ## Examples
50
+
51
+ Sets retention label on the list with specified site-relative URL located in the specified site.
52
+
53
+ ```sh
54
+ m365 spo list retentionlabel ensure --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'Shared Documents' --label 'Some label'
55
+ ```
56
+
57
+ Sets retention label and disables editing and deleting items on the list and all existing items for the list with specified title located in the specified site.
58
+
59
+ ```sh
60
+ m365 spo list retentionlabel ensure --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'Documents' --label 'Some label' --blockEdit --blockDelete --syncToItems
61
+ ```
62
+
63
+ ## Response
64
+
65
+ The command won't return a response on success.
@@ -11,16 +11,16 @@ m365 spo listitem remove [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the list to remove is located
14
+ : URL of the site where the list item to remove is located
15
15
 
16
16
  `-i, --id <id>`
17
17
  : The ID of the list item to remove.
18
18
 
19
19
  `-l, --listId [listId]`
20
- : ID of the list where the item should be added. Specify either `listTitle`, `listId` or `listUrl`
20
+ : ID of the list where the item should be removed. Specify either `listTitle`, `listId` or `listUrl`
21
21
 
22
22
  `-t, --listTitle [listTitle]`
23
- : Title of the list where the item should be added. Specify either `listTitle`, `listId` or `listUrl`
23
+ : Title of the list where the item should be removed. Specify either `listTitle`, `listId` or `listUrl`
24
24
 
25
25
  `--listUrl [listUrl]`
26
26
  : Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
@@ -35,19 +35,19 @@ m365 spo listitem remove [options]
35
35
 
36
36
  ## Examples
37
37
 
38
- Remove the list item with ID _1_ from list with ID _0cd891ef-afce-4e55-b836-fce03286cccf_ located in site _https://contoso.sharepoint.com/sites/project-x_
38
+ Remove the list item located in a given site based on the list id
39
39
 
40
40
  ```sh
41
41
  m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --id 1
42
42
  ```
43
43
 
44
- Remove the list item with ID _1_ from list with title _List 1_ located in site _https://contoso.sharepoint.com/sites/project-x_
44
+ Remove the list item located in a given site based on the list title
45
45
 
46
46
  ```sh
47
47
  m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'List 1' --id 1
48
48
  ```
49
49
 
50
- Remove the list item with a specific ID from a list retrieved by server-relative URL located in a specific site
50
+ Remove the list item located in a given site based on the server-relative list url
51
51
 
52
52
  ```sh
53
53
  m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl /sites/project-x/lists/TestList --id 1
@@ -0,0 +1,55 @@
1
+ # spo listitem retentionlabel remove
2
+
3
+ Clears the retention label from a list item
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo listitem retentionlabel remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --webUrl <webUrl>`
14
+ : URL of the site where the retentionlabel from a listitem to remove is located
15
+
16
+ `-i, --listItemId <listItemId>`
17
+ : The ID of the list item for which the retention label should be removed.
18
+
19
+ `-l, --listId [listId]`
20
+ : ID of the list where the retention label should be removed. Specify either `listTitle`, `listId` or `listUrl`
21
+
22
+ `-t, --listTitle [listTitle]`
23
+ : Title of the list where the retention label should be removed. Specify either `listTitle`, `listId` or `listUrl`
24
+
25
+ `--listUrl [listUrl]`
26
+ : Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
27
+
28
+ `--confirm`
29
+ : Don't prompt for confirming removing the retention label from a list item
30
+
31
+ --8<-- "docs/cmd/_global.md"
32
+
33
+ ## Examples
34
+
35
+ Removes the retention label from a list item in a given site based on the list id
36
+
37
+ ```sh
38
+ m365 spo listitem retentionlabel remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --listItemId 1
39
+ ```
40
+
41
+ Removes the retention label from a list item in a given site based on the list title
42
+
43
+ ```sh
44
+ m365 spo listitem retentionlabel remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'List 1' --listItemId 1
45
+ ```
46
+
47
+ Removes the retention label from a list item in a given site based on the server relative list url
48
+
49
+ ```sh
50
+ m365 spo listitem retentionlabel remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl /sites/project-x/lists/TestList --listItemId 1
51
+ ```
52
+
53
+ ## Response
54
+
55
+ The command won't return a response on success.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.1.0-beta.4fefcde",
3
+ "version": "6.1.0-beta.6108255",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",