@pnp/cli-microsoft365 7.0.0-beta.093ef31 → 7.0.0-beta.18ce559
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.
- package/README.md +4 -4
- package/dist/Auth.js +10 -1
- package/dist/Command.js +2 -2
- package/dist/cli/Cli.js +4 -4
- package/dist/m365/aad/commands/app/app-get.js +4 -1
- package/dist/m365/aad/commands/app/app-remove.js +3 -1
- package/dist/m365/aad/commands/app/app-role-add.js +4 -1
- package/dist/m365/aad/commands/app/app-role-list.js +4 -1
- package/dist/m365/aad/commands/app/app-role-remove.js +5 -2
- package/dist/m365/aad/commands/app/app-set.js +8 -5
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +11 -6
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -4
- package/dist/m365/aad/commands/group/group-get.js +4 -4
- package/dist/m365/aad/commands/group/group-list.js +1 -23
- package/dist/m365/aad/commands/group/group-remove.js +98 -0
- package/dist/m365/aad/commands/m365group/m365group-add.js +21 -12
- package/dist/m365/aad/commands/m365group/m365group-conversation-list.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-conversation-post-list.js +4 -0
- package/dist/m365/aad/commands/m365group/m365group-get.js +4 -3
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -1
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +4 -1
- package/dist/m365/aad/commands/m365group/m365group-remove.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-renew.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-set.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-teamify.js +14 -6
- package/dist/m365/aad/commands/m365group/m365group-user-add.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +5 -0
- package/dist/m365/aad/commands/m365group/m365group-user-set.js +5 -0
- package/dist/m365/aad/commands/sp/sp-add.js +4 -1
- package/dist/m365/aad/commands/sp/sp-get.js +4 -1
- package/dist/m365/aad/commands/user/user-get.js +7 -2
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/booking/commands/business/business-get.js +4 -1
- package/dist/m365/commands/login.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +13 -13
- package/dist/m365/graph/commands/subscription/subscription-add.js +5 -5
- package/dist/m365/outlook/commands/message/message-list.js +4 -2
- package/dist/m365/outlook/commands/message/message-move.js +4 -2
- package/dist/m365/pa/commands/app/app-export.js +7 -7
- package/dist/m365/pa/commands/connector/connector-export.js +5 -5
- package/dist/m365/planner/commands/bucket/bucket-add.js +4 -1
- package/dist/m365/planner/commands/bucket/bucket-get.js +9 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +4 -1
- package/dist/m365/planner/commands/bucket/bucket-remove.js +7 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +8 -2
- package/dist/m365/planner/commands/plan/plan-add.js +4 -1
- package/dist/m365/planner/commands/plan/plan-get.js +4 -1
- package/dist/m365/planner/commands/plan/plan-list.js +4 -1
- package/dist/m365/planner/commands/plan/plan-remove.js +4 -1
- package/dist/m365/planner/commands/plan/plan-set.js +4 -1
- package/dist/m365/planner/commands/roster/roster-get.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-add.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-get.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-list.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-remove.js +4 -1
- package/dist/m365/planner/commands/roster/roster-plan-list.js +4 -1
- package/dist/m365/planner/commands/roster/roster-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-add.js +4 -1
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +4 -1
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +4 -1
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-get.js +11 -3
- package/dist/m365/planner/commands/task/task-list.js +10 -2
- package/dist/m365/planner/commands/task/task-reference-add.js +4 -1
- package/dist/m365/planner/commands/task/task-reference-list.js +4 -1
- package/dist/m365/planner/commands/task/task-reference-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-remove.js +10 -4
- package/dist/m365/planner/commands/task/task-set.js +4 -1
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +4 -1
- package/dist/m365/pp/commands/card/card-get.js +3 -5
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +3 -1
- package/dist/m365/pp/commands/chatbot/chatbot-list.js +2 -2
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -1
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.5.js → doctor-1.18.0.js} +2 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002028_DEVDEP_microsoft_rush_stack_compiler_4_7.js +13 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.5.js → upgrade-1.18.0.js} +35 -27
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +5 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +3 -2
- package/dist/m365/spo/commands/commandset/commandset-get.js +4 -2
- package/dist/m365/spo/commands/commandset/commandset-remove.js +2 -1
- package/dist/m365/spo/commands/commandset/commandset-set.js +3 -1
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -2
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -1
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +3 -1
- package/dist/m365/spo/commands/file/file-get.js +11 -8
- package/dist/m365/spo/commands/file/file-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -2
- package/dist/m365/spo/commands/file/file-version-get.js +2 -2
- package/dist/m365/spo/commands/file/file-version-list.js +2 -2
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -2
- package/dist/m365/spo/commands/group/group-member-add.js +24 -24
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -4
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +4 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +3 -1
- package/dist/m365/spo/commands/listitem/listitem-add.js +1 -0
- package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +127 -0
- package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +97 -0
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +121 -0
- package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +115 -0
- package/dist/m365/spo/commands/listitem/listitem-set.js +3 -2
- package/dist/m365/spo/commands/page/clientsidepages.js +18 -0
- package/dist/m365/spo/commands/page/page-get.js +1 -0
- package/dist/m365/spo/commands/page/page-list.js +4 -3
- package/dist/m365/spo/commands/page/page-section-add.js +56 -21
- package/dist/m365/spo/commands/page/page-set.js +13 -2
- package/dist/m365/spo/commands/site/site-commsite-enable.js +34 -5
- package/dist/m365/spo/commands/site/site-list.js +5 -7
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +8 -3
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +8 -3
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -1
- package/dist/m365/spo/commands/term/term-get.js +6 -6
- package/dist/m365/spo/commands/user/user-get.js +10 -10
- package/dist/m365/spo/commands.js +4 -0
- package/dist/m365/teams/commands/app/app-remove.js +49 -15
- package/dist/m365/teams/commands/channel/channel-add.js +5 -1
- package/dist/m365/teams/commands/channel/channel-member-add.js +12 -10
- package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -1
- package/dist/m365/teams/commands/channel/channel-member-set.js +4 -1
- package/dist/m365/teams/commands/chat/chat-get.js +7 -10
- package/dist/m365/teams/commands/chat/chat-message-send.js +8 -10
- package/dist/m365/teams/commands/team/team-clone.js +5 -10
- package/dist/m365/teams/commands/team/team-list.js +94 -30
- package/dist/m365/tenant/commands/info/info-get.js +83 -0
- package/dist/m365/tenant/commands.js +1 -0
- package/dist/utils/aadGroup.js +21 -3
- package/dist/utils/formatting.js +7 -0
- package/dist/utils/powerPlatform.js +1 -1
- package/docs/docs/_clisettings.mdx +1 -1
- package/docs/docs/cmd/aad/app/app-set.mdx +15 -15
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +9 -9
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +10 -10
- package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
- package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
- package/docs/docs/cmd/aad/group/group-remove.mdx +44 -0
- package/docs/docs/cmd/aad/m365group/m365group-add.mdx +13 -3
- package/docs/docs/cmd/aad/policy/policy-list.mdx +5 -5
- package/docs/docs/cmd/cli/config/config-list.mdx +1 -1
- package/docs/docs/cmd/flow/flow-export.mdx +11 -11
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +10 -10
- package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
- package/docs/docs/cmd/pa/connector/connector-export.mdx +3 -3
- package/docs/docs/cmd/pp/chatbot/chatbot-list.mdx +4 -4
- package/docs/docs/cmd/pp/solution/solution-publisher-get.mdx +2 -2
- package/docs/docs/cmd/pp/solution/solution-publisher-remove.mdx +2 -2
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-get.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-get.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +2 -2
- package/docs/docs/cmd/spo/group/group-member-add.mdx +27 -27
- package/docs/docs/cmd/spo/list/list-contenttype-remove.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
- package/docs/docs/cmd/spo/listitem/listitem-attachment-add.mdx +110 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-get.mdx +104 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-remove.mdx +58 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-set.mdx +58 -0
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
- package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-section-add.mdx +25 -1
- package/docs/docs/cmd/spo/page/page-set.mdx +23 -0
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +11 -2
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +2 -4
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
- package/docs/docs/cmd/spo/user/user-get.mdx +8 -8
- package/docs/docs/cmd/teams/app/app-remove.mdx +9 -6
- package/docs/docs/cmd/teams/channel/channel-member-add.mdx +4 -4
- package/docs/docs/cmd/teams/team/team-clone.mdx +3 -3
- package/docs/docs/cmd/teams/team/team-list.mdx +47 -22
- package/docs/docs/cmd/tenant/info/info-get.mdx +101 -0
- package/npm-shrinkwrap.json +24 -24
- package/package.json +8 -12
|
@@ -16,72 +16,72 @@ m365 spo group member add [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-u, --webUrl <webUrl>`
|
|
19
|
-
: URL of the site where the SharePoint group is available
|
|
19
|
+
: URL of the site where the SharePoint group is available.
|
|
20
20
|
|
|
21
21
|
`--groupId [groupId]`
|
|
22
|
-
: Id of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName
|
|
22
|
+
: Id of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName`.
|
|
23
23
|
|
|
24
24
|
`--groupName [groupName]`
|
|
25
|
-
: Name of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName
|
|
25
|
+
: Name of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName`.
|
|
26
26
|
|
|
27
|
-
`--
|
|
28
|
-
: User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma-separated (e.g. megan.bowen@contoso.com,alex.wilber@contoso.com). Specify either `
|
|
27
|
+
`--userNames [userNames]`
|
|
28
|
+
: User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma-separated (e.g. megan.bowen@contoso.com,alex.wilber@contoso.com). Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
|
|
29
29
|
|
|
30
|
-
`--
|
|
31
|
-
: User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma-separated (e.g. megan.bowen@contoso.com,alex.wilber@contoso.com). Specify either `
|
|
30
|
+
`--emails [emails]`
|
|
31
|
+
: User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma-separated (e.g. megan.bowen@contoso.com,alex.wilber@contoso.com). Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
|
|
32
32
|
|
|
33
|
-
`--
|
|
34
|
-
: 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 Ids have to be comma-separated. Specify either `
|
|
33
|
+
`--userIds [userIds]`
|
|
34
|
+
: 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 Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
|
|
35
35
|
|
|
36
|
-
`--
|
|
37
|
-
: The object Id of the Azure AD group to add as a member. If multiple groups need to be added, the Ids have to be comma-separated. Specify either `
|
|
36
|
+
`--aadGroupIds [aadGroupIds]`
|
|
37
|
+
: The object Id of the Azure AD group to add as a member. If multiple groups need to be added, the Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
|
|
38
38
|
|
|
39
|
-
`--
|
|
40
|
-
: The name of the Azure AD group to add as a member. Specify either `
|
|
39
|
+
`--aadGroupNames [aadGroupNames]`
|
|
40
|
+
: The name of the Azure AD group to add as a member. If multiple groups need to be added, they have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
<Global />
|
|
44
44
|
|
|
45
45
|
## Remarks
|
|
46
46
|
|
|
47
|
-
For the `
|
|
47
|
+
For the `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames` options you can specify multiple values by separating them with a comma. If one of the specified entries is not valid, the command will fail with an error message showing the list of invalid values.
|
|
48
48
|
|
|
49
49
|
## Examples
|
|
50
50
|
|
|
51
|
-
Add a user with the
|
|
51
|
+
Add a user with the userNames parameter to a SharePoint group with the groupId parameter
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --
|
|
54
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userNames "Alex.Wilber@contoso.com"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Add multiple users with the
|
|
57
|
+
Add multiple users with the userNames parameter to a SharePoint group with the groupId parameter
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --
|
|
60
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userNames "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Add a user with the
|
|
63
|
+
Add a user with the emails parameter to a SharePoint group with the groupName parameter
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --
|
|
66
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --emails "Alex.Wilber@contoso.com"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Add multiple users with the
|
|
69
|
+
Add multiple users with the emails parameter to a SharePoint group with the groupName parameter
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --
|
|
72
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --emails "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Add a user with the
|
|
75
|
+
Add a user with the userIds parameter to a SharePoint group with the groupId parameter
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --
|
|
78
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userIds 5
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Add multiple users with the
|
|
81
|
+
Add multiple users with the userIds parameter to a SharePoint group with the groupId parameter
|
|
82
82
|
|
|
83
83
|
```sh
|
|
84
|
-
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --
|
|
84
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userIds "5,12"
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Add multiple users with the aadUserId parameter to a SharePoint group with the groupId parameter
|
|
@@ -140,7 +140,7 @@ m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --
|
|
|
140
140
|
<TabItem value="Markdown">
|
|
141
141
|
|
|
142
142
|
```md
|
|
143
|
-
# spo group member add --webUrl "https://contoso.sharepoint.com" --groupId "5" --
|
|
143
|
+
# spo group member add --webUrl "https://contoso.sharepoint.com" --groupId "5" --aadGroupIds "f2fb2f10-cfd2-4054-8ffd-64533657a5ab"
|
|
144
144
|
|
|
145
145
|
Date: 13/2/2023
|
|
146
146
|
|
|
@@ -51,7 +51,7 @@ m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/p
|
|
|
51
51
|
Remove content type with a specific id from the list retrieved by server relative URL in a specific site. This will not prompt for confirmation.
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --
|
|
54
|
+
m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --id 0x010109010053EE7AEB1FC54A41B4D9F66ADBDC312A --force
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Response
|
|
@@ -111,7 +111,6 @@ m365 spo listitem add --listTitle "Demo List" --webUrl https://contoso.sharepoin
|
|
|
111
111
|
"Id": 234,
|
|
112
112
|
"ServerRedirectedEmbedUri": null,
|
|
113
113
|
"ServerRedirectedEmbedUrl": "",
|
|
114
|
-
"ID": 234,
|
|
115
114
|
"ContentTypeId": "0x01003CDBEB7138618C47A98D56499135D6EE0004C0F5794DEBCC4BAC981AC4AE1BD803",
|
|
116
115
|
"Title": "Test",
|
|
117
116
|
"Modified": "2022-11-16T20:55:45Z",
|
|
@@ -138,7 +137,6 @@ m365 spo listitem add --listTitle "Demo List" --webUrl https://contoso.sharepoin
|
|
|
138
137
|
EditorId : 10
|
|
139
138
|
FileSystemObjectType : 0
|
|
140
139
|
GUID : cac57513-e870-4e7a-9f23-f4ea10e14f4e
|
|
141
|
-
ID : 236
|
|
142
140
|
Id : 236
|
|
143
141
|
Modified : 2022-11-16T20:56:31Z
|
|
144
142
|
OData__UIVersionString : 1.0
|
|
@@ -152,8 +150,8 @@ m365 spo listitem add --listTitle "Demo List" --webUrl https://contoso.sharepoin
|
|
|
152
150
|
<TabItem value="CSV">
|
|
153
151
|
|
|
154
152
|
```csv
|
|
155
|
-
FileSystemObjectType,Id,ServerRedirectedEmbedUri,ServerRedirectedEmbedUrl,
|
|
156
|
-
0,235,,,
|
|
153
|
+
FileSystemObjectType,Id,ServerRedirectedEmbedUri,ServerRedirectedEmbedUrl,ContentTypeId,Title,Modified,Created,AuthorId,EditorId,OData__UIVersionString,Attachments,GUID,ComplianceAssetId,OData__vti_ItemDeclaredRecord
|
|
154
|
+
0,235,,,0x01003CDBEB7138618C47A98D56499135D6EE0004C0F5794DEBCC4BAC981AC4AE1BD803,Test,2022-11-16T20:56:09Z,2022-11-16T20:56:09Z,10,10,1.0,,7aa8f3bd-a0a2-4974-81c8-2ac7ddc8e2d8,,
|
|
157
155
|
```
|
|
158
156
|
|
|
159
157
|
</TabItem>
|
|
@@ -176,7 +174,6 @@ m365 spo listitem add --listTitle "Demo List" --webUrl https://contoso.sharepoin
|
|
|
176
174
|
Title | Test
|
|
177
175
|
ComplianceAssetId | null
|
|
178
176
|
FieldName1 | null
|
|
179
|
-
ID | 234
|
|
180
177
|
Modified | 2022-11-16T20:55:45Z
|
|
181
178
|
Created | 2022-11-16T20:55:45Z
|
|
182
179
|
AuthorId | 10
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo listitem attachment add
|
|
6
|
+
|
|
7
|
+
Adds an attachment to a list item
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo listitem attachment add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list item is located.
|
|
20
|
+
|
|
21
|
+
`--listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`--listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--listItemId <listItemId>`
|
|
31
|
+
: The ID of the list item.
|
|
32
|
+
|
|
33
|
+
`-p, --filePath <filePath>`
|
|
34
|
+
: Local path to the file that will be added as an attachment to the list item.
|
|
35
|
+
|
|
36
|
+
`-n, --fileName [fileName]`
|
|
37
|
+
: Name for the file. If no name is provided, the name from `filePath` will be utilized.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<Global />
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Add a new attachment to a list item from a local file by using list title
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo listitem attachment add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "DemoList" --listItemId 147 --filePath "C:/Reports/File1.jpg"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Add a new attachment to a list item from a local file by using list URL with a different filename
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo listitem attachment add --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl "/sites/project-x/Lists/DemoList" --listItemId 147 --filePath "C:/Reports/File1.jpg" --fileName "File2"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
<Tabs>
|
|
59
|
+
<TabItem value="JSON">
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
[
|
|
63
|
+
{
|
|
64
|
+
"FileName": "File1.jpg",
|
|
65
|
+
"FileNameAsPath": {
|
|
66
|
+
"DecodedUrl": "File1.jpg"
|
|
67
|
+
},
|
|
68
|
+
"ServerRelativePath": {
|
|
69
|
+
"DecodedUrl": "/Lists/DemoList/Attachments/147/File1.jpg"
|
|
70
|
+
},
|
|
71
|
+
"ServerRelativeUrl": "/Lists/Test/Attachments/147/File1.jpg"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</TabItem>
|
|
77
|
+
<TabItem value="Text">
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
FileName : File1.jpg
|
|
81
|
+
FileNameAsPath : {"DecodedUrl":"File1jpg"}
|
|
82
|
+
ServerRelativePath: {"DecodedUrl":"/Lists/DemoList/Attachments/743/File1.jpg"}
|
|
83
|
+
ServerRelativeUrl : /Lists/DemoList/Attachments/147/File1.jpg
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
</TabItem>
|
|
87
|
+
<TabItem value="CSV">
|
|
88
|
+
|
|
89
|
+
```csv
|
|
90
|
+
FileName,ServerRelativeUrl
|
|
91
|
+
File1.jpg,/Lists/DemoList/Attachments/147/File1.jpg
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</TabItem>
|
|
95
|
+
<TabItem value="Markdown">
|
|
96
|
+
|
|
97
|
+
```md
|
|
98
|
+
# spo listitem attachment add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "DemoList" --listItemId 147 --filePath "C:/Reports/File1.jpg"
|
|
99
|
+
|
|
100
|
+
Date: 25/07/2023
|
|
101
|
+
|
|
102
|
+
Property | Value
|
|
103
|
+
---------|-------
|
|
104
|
+
FileName | File1.jpg
|
|
105
|
+
ServerRelativeUrl | /Lists/DemoList/Attachments/147/File1.jpg
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
</TabItem>
|
|
109
|
+
</Tabs>
|
|
110
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo listitem attachment get
|
|
6
|
+
|
|
7
|
+
Gets an attachment from a list item
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo listitem attachment get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list item is located.
|
|
20
|
+
|
|
21
|
+
`--listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`--listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--listItemId <listItemId>`
|
|
31
|
+
: The ID of the list item.
|
|
32
|
+
|
|
33
|
+
`-n, --fileName <fileName>`
|
|
34
|
+
: Name of the file to get.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Get an attachment from a list item by using list title.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo listitem attachment get --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --listItemId 147 --fileName "File1.jpg"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Get an attachment from a list item by using list URL.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo listitem attachment get --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl "/sites/project-x/Lists/DemoList" --listItemId 147 --fileName "File1.jpg"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
<Tabs>
|
|
56
|
+
<TabItem value="JSON">
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"FileName": "File1.jpg",
|
|
61
|
+
"FileNameAsPath": {
|
|
62
|
+
"DecodedUrl": "File1.jpg"
|
|
63
|
+
},
|
|
64
|
+
"ServerRelativePath": {
|
|
65
|
+
"DecodedUrl": "/sites/project-x/Lists/DemoListAttachments/147/File1.jpg"
|
|
66
|
+
},
|
|
67
|
+
"ServerRelativeUrl": "/sites/project-x/Lists/DemoListAttachments/147/File1.jpg"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
</TabItem>
|
|
72
|
+
<TabItem value="Text">
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
FileName : File1.jpg
|
|
76
|
+
FileNameAsPath : {"DecodedUrl":"File1.jpg"}
|
|
77
|
+
ServerRelativePath: {"DecodedUrl":"/sites/project-x/Lists/DemoListAttachments/147/File1.jpg"}
|
|
78
|
+
ServerRelativeUrl : /sites/project-x/Lists/DemoListAttachments/147/File1.jpg
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
</TabItem>
|
|
82
|
+
<TabItem value="CSV">
|
|
83
|
+
|
|
84
|
+
```csv
|
|
85
|
+
FileName,ServerRelativeUrl
|
|
86
|
+
File1.jpg,/sites/project-x/Lists/DemoListAttachments/147/File1.jpg
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</TabItem>
|
|
90
|
+
<TabItem value="Markdown">
|
|
91
|
+
|
|
92
|
+
```md
|
|
93
|
+
# spo listitem attachment get --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "PnP PowerShell List" --listItemId "1" --fileName "File1.jpg"
|
|
94
|
+
|
|
95
|
+
Date: 7/20/2023
|
|
96
|
+
|
|
97
|
+
Property | Value
|
|
98
|
+
---------|-------
|
|
99
|
+
FileName | File1.jpg
|
|
100
|
+
ServerRelativeUrl | /sites/project-x/Lists/DemoListAttachments/147/File1.jpg
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</TabItem>
|
|
104
|
+
</Tabs>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo listitem attachment remove
|
|
6
|
+
|
|
7
|
+
Removes an attachment from a list item
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo listitem attachment remove [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list item is located.
|
|
20
|
+
|
|
21
|
+
`--listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`--listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--listItemId <listItemId>`
|
|
31
|
+
: The ID of the list item.
|
|
32
|
+
|
|
33
|
+
`-n, --fileName <fileName>`
|
|
34
|
+
: Name of the file to remove.
|
|
35
|
+
|
|
36
|
+
`-f, --force`
|
|
37
|
+
: Don't prompt for confirmation.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<Global />
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Remove an attachment from a list item using list tile.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo listitem attachment remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --listItemId 147 --fileName "File1.jpg"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Remove an attachment from a list item using list URL.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo listitem attachment remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl "/sites/project-x/Lists/DemoList" --listItemId 147 --fileName "File1.jpg"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo listitem attachment set
|
|
6
|
+
|
|
7
|
+
Updates an attachment from a list item
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo listitem attachment set [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list item is located.
|
|
20
|
+
|
|
21
|
+
`--listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`--listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--listItemId <listItemId>`
|
|
31
|
+
: The ID of the list item.
|
|
32
|
+
|
|
33
|
+
`-p, --filePath <filePath>`
|
|
34
|
+
: Local path used for updating the attachment contents.
|
|
35
|
+
|
|
36
|
+
`-n, --fileName <fileName>`
|
|
37
|
+
: Name of the file to update.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<Global />
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Update an attachment from a list item by using list title
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo listitem attachment set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --listItemId 147 --fileName "File1.jpg" --filePath "C:/Reports/File2.jpg"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Update an attachment from a list item by using list URL
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo listitem attachment set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl "/sites/project-x/Lists/DemoList" --listItemId 147 --fileName "File1.jpg" --filePath "C:/Reports/File2.jpg"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
The command won't return a response on success.
|
|
@@ -108,7 +108,6 @@ m365 spo listitem set --listTitle "Demo List" --id 147 --webUrl https://contoso.
|
|
|
108
108
|
"Id": 236,
|
|
109
109
|
"ServerRedirectedEmbedUri": null,
|
|
110
110
|
"ServerRedirectedEmbedUrl": "",
|
|
111
|
-
"ID": 236,
|
|
112
111
|
"ContentTypeId": "0x01003CDBEB7138618C47A98D56499135D6EE0004C0F5794DEBCC4BAC981AC4AE1BD803",
|
|
113
112
|
"Title": "Updated Title",
|
|
114
113
|
"Modified": "2022-11-16T21:10:06Z",
|
|
@@ -135,7 +134,6 @@ m365 spo listitem set --listTitle "Demo List" --id 147 --webUrl https://contoso.
|
|
|
135
134
|
EditorId : 10
|
|
136
135
|
FileSystemObjectType : 0
|
|
137
136
|
GUID : cac57513-e870-4e7a-9f23-f4ea10e14f4e
|
|
138
|
-
ID : 236
|
|
139
137
|
Id : 236
|
|
140
138
|
Modified : 2022-11-16T21:10:37Z
|
|
141
139
|
OData__UIVersionString : 8.0
|
|
@@ -149,8 +147,8 @@ m365 spo listitem set --listTitle "Demo List" --id 147 --webUrl https://contoso.
|
|
|
149
147
|
<TabItem value="CSV">
|
|
150
148
|
|
|
151
149
|
```csv
|
|
152
|
-
FileSystemObjectType,Id,ServerRedirectedEmbedUri,ServerRedirectedEmbedUrl,
|
|
153
|
-
0,236,,,
|
|
150
|
+
FileSystemObjectType,Id,ServerRedirectedEmbedUri,ServerRedirectedEmbedUrl,ContentTypeId,Title,Modified,Created,AuthorId,EditorId,OData__UIVersionString,Attachments,GUID,ComplianceAssetId,OData__vti_ItemDeclaredRecord
|
|
151
|
+
0,236,,,0x01003CDBEB7138618C47A98D56499135D6EE0004C0F5794DEBCC4BAC981AC4AE1BD803,Updated Title,2022-11-16T21:10:55Z,2022-11-16T20:56:31Z,10,10,9.0,1,cac57513-e870-4e7a-9f23-f4ea10e14f4e,,
|
|
154
152
|
```
|
|
155
153
|
|
|
156
154
|
</TabItem>
|
|
@@ -173,7 +171,6 @@ m365 spo listitem set --listTitle "Demo List" --id 147 --webUrl https://contoso.
|
|
|
173
171
|
Title | Updated Title
|
|
174
172
|
ComplianceAssetId | null
|
|
175
173
|
FieldName1 | null
|
|
176
|
-
ID | 236
|
|
177
174
|
Modified | 2022-11-16T21:10:06Z
|
|
178
175
|
Created | 2022-11-16T20:56:31Z
|
|
179
176
|
AuthorId | 10
|
|
@@ -85,7 +85,6 @@ m365 spo page get --webUrl https://contoso.sharepoint.com/sites/team-a --name ho
|
|
|
85
85
|
"OData__OriginalSourceItemId": null,
|
|
86
86
|
"OData__SPCallToAction": null,
|
|
87
87
|
"OData__ModerationStatus": 3,
|
|
88
|
-
"ID": 21,
|
|
89
88
|
"Created": "2022-11-26T01:51:46",
|
|
90
89
|
"AuthorId": 7,
|
|
91
90
|
"Modified": "2022-11-26T01:55:47",
|
|
@@ -89,7 +89,6 @@ m365 spo page list --webUrl https://contoso.sharepoint.com/sites/team-a
|
|
|
89
89
|
"OData__OriginalSourceItemId": null,
|
|
90
90
|
"OData__SPCallToAction": null,
|
|
91
91
|
"OData__ModerationStatus": 0,
|
|
92
|
-
"ID": 10,
|
|
93
92
|
"Created": "2020-09-06T02:18:55-07:00",
|
|
94
93
|
"AuthorId": 1073741823,
|
|
95
94
|
"Modified": "2020-09-06T02:18:55-07:00",
|
|
@@ -20,10 +20,16 @@ m365 spo page section add [options]
|
|
|
20
20
|
: URL of the site where the page to retrieve is located.
|
|
21
21
|
|
|
22
22
|
`-t, --sectionTemplate <sectionTemplate>`
|
|
23
|
-
: Type of section to add. Allowed values `OneColumn`, `OneColumnFullWidth`, `TwoColumn`, `ThreeColumn`, `TwoColumnLeft`, `TwoColumnRight`.
|
|
23
|
+
: Type of section to add. Allowed values `OneColumn`, `OneColumnFullWidth`, `TwoColumn`, `ThreeColumn`, `TwoColumnLeft`, `TwoColumnRight`, `Vertical`.
|
|
24
24
|
|
|
25
25
|
`--order [order]`
|
|
26
26
|
: Order of the section to add.
|
|
27
|
+
|
|
28
|
+
`--zoneEmphasis [zoneEmphasis]`
|
|
29
|
+
: Section background shading. Allowed values `None`, `Neutral`, `Soft`, `Strong`
|
|
30
|
+
|
|
31
|
+
`--isLayoutReflowOnTop`
|
|
32
|
+
: The position of the Vertical section for smaller screens. Applied only for Vertical section.
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
<Global />
|
|
@@ -40,6 +46,24 @@ Add section to the modern page
|
|
|
40
46
|
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate OneColumn --order 1
|
|
41
47
|
```
|
|
42
48
|
|
|
49
|
+
Add section with background shading to the modern page
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate OneColumn --zoneEmphasis Strong
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Add a vertical section to the modern page. There can only be one vertical section per page. If a vertical section already exists on the page, the command will not have any effect.
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate Vertical
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Add Vertical section with background shading to the modern page with adjusting the position of this section for smaller screens to the top
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate Vertical --zoneEmphasis Neutral --isLayoutReflowOnTop
|
|
65
|
+
```
|
|
66
|
+
|
|
43
67
|
## Response
|
|
44
68
|
|
|
45
69
|
The command won't return a response on success.
|
|
@@ -42,6 +42,9 @@ m365 spo page set [options]
|
|
|
42
42
|
|
|
43
43
|
`--title [title]`
|
|
44
44
|
: The title to set for the page.
|
|
45
|
+
|
|
46
|
+
`--content [content]`
|
|
47
|
+
: JSON string containing page content
|
|
45
48
|
```
|
|
46
49
|
|
|
47
50
|
<Global />
|
|
@@ -52,6 +55,20 @@ If you try to create a page with a name of a page that already exists, you will
|
|
|
52
55
|
|
|
53
56
|
If you choose to promote the page using the `promoteAs` option or enable page comments, you will see the result only after publishing the page.
|
|
54
57
|
|
|
58
|
+
Running this command from the Windows Command Shell (cmd.exe) or PowerShell for Windows OS XP, 7, 8, 8.1 without bash installed might require additional formatting for command options that have JSON, XML or JavaScript values because the command shell treat quotes differently. For example, this is how you can add page content from the Windows cmd.exe:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
m365 spo page set --name page.aspx --webUrl https://contoso.sharepoint.com/sites/a-team --content '[{\"controlType\": 4,\"id\": \"42b8afe8-dafe-4c11-bfbf-df5ef5b1feb7\",\"position\": {\"layoutIndex\": 1,\"zoneIndex\": 1,\"sectionIndex\": 1,\"sectionFactor\": 12,\"controlIndex\": 1},\"addedFromPersistedData\": true,\"innerHTML\":\"<p>Hello World</p>\"}]'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Note, how the content option has escaped double quotes `'[{\"controlType\": 4,\"id\": \"42b8afe8-dafe-4c11-bfbf-df5ef5b1feb7\",\"position\": {\"layoutIndex\": 1,\"zoneIndex\": 1,\"sectionIndex\": 1,\"sectionFactor\": 12,\"controlIndex\": 1},\"addedFromPersistedData\": true,\"innerHTML\":\"<p>Hello World</p>\"}]'` compared to execution from bash `''[{"controlType": 4,"id": "42b8afe8-dafe-4c11-bfbf-df5ef5b1feb7","position": {"layoutIndex": 1,"zoneIndex": 1,"sectionIndex": 1,"sectionFactor": 12,"controlIndex": 1},"addedFromPersistedData": true,"innerHTML":"<p>Hello World</p>"}]'`.
|
|
65
|
+
|
|
66
|
+
:::caution Escaping JSON in PowerShell
|
|
67
|
+
|
|
68
|
+
When using the `--content` option it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../../user-guide/using-cli.mdx#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../../user-guide/using-cli.mdx#passing-complex-content-into-cli-options) instead.
|
|
69
|
+
|
|
70
|
+
:::
|
|
71
|
+
|
|
55
72
|
## Examples
|
|
56
73
|
|
|
57
74
|
Change the layout of the existing page to _Article_
|
|
@@ -102,6 +119,12 @@ Set page description
|
|
|
102
119
|
m365 spo page set --name page.aspx --webUrl https://contoso.sharepoint.com/sites/a-team --description "Description to add for the page"
|
|
103
120
|
```
|
|
104
121
|
|
|
122
|
+
Set page content
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
m365 spo page set --name page.aspx --webUrl https://contoso.sharepoint.com/sites/a-team --content '[{\"controlType\": 4,\"id\": \"42b8afe8-dafe-4c11-bfbf-df5ef5b1feb7\",\"position\": {\"layoutIndex\": 1,\"zoneIndex\": 1,\"sectionIndex\": 1,\"sectionFactor\": 12,\"controlIndex\": 1},\"addedFromPersistedData\": true,\"innerHTML\":\"<p>Hello World</p>\"}]'
|
|
126
|
+
```
|
|
127
|
+
|
|
105
128
|
## Response
|
|
106
129
|
|
|
107
130
|
The command won't return a response on success.
|
|
@@ -17,7 +17,10 @@ m365 spo site commsite enable [options]
|
|
|
17
17
|
: The URL of the site to enable communication site features on
|
|
18
18
|
|
|
19
19
|
`-i, --designPackageId [designPackageId]`
|
|
20
|
-
: The ID of the site design to apply when enabling communication site features.
|
|
20
|
+
: The ID of the site design to apply when enabling communication site features. Specify designPackageId or designPackage but not both.
|
|
21
|
+
|
|
22
|
+
`-p, --designPackage [designPackage]`
|
|
23
|
+
: The site design to apply when enabling communication site features. Valid values are: Topic, Showcase, or Blank. Defaults to Topic. Specify designPackageId or designPackage but not both.
|
|
21
24
|
```
|
|
22
25
|
|
|
23
26
|
<Global />
|
|
@@ -38,12 +41,18 @@ Enable communication site features on an existing site
|
|
|
38
41
|
m365 spo site commsite enable --url https://contoso.sharepoint.com
|
|
39
42
|
```
|
|
40
43
|
|
|
41
|
-
Enable communication site features on an existing site and apply Showcase design package
|
|
44
|
+
Enable communication site features on an existing site and apply the Showcase design package using its ID.
|
|
42
45
|
|
|
43
46
|
```sh
|
|
44
47
|
m365 spo site commsite enable --url https://contoso.sharepoint.com --designPackageId 6142d2a0-63a5-4ba0-aede-d9fefca2c767
|
|
45
48
|
```
|
|
46
49
|
|
|
50
|
+
Enable communication site features on an existing site and apply the Showcase design package using its friendly name.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo site commsite enable --url https://contoso.sharepoint.com --designPackage Showcase
|
|
54
|
+
```
|
|
55
|
+
|
|
47
56
|
## Response
|
|
48
57
|
|
|
49
58
|
The command won't return a response on success.
|