Usage
m365 spo listitem batch remove [options]
Description
Removes items from a list in batch
Options
| Name |
Description |
-u, --webUrl <webUrl> |
URL of the SharePoint site. |
-l, --listId [listId] |
ID of the list. Specify either listTitle, listId, or listUrl, but not multiple. |
-t, --listTitle [listTitle] |
Title of the list. Specify either listTitle, listId, or listUrl, but not multiple. |
--listUrl [listUrl] |
Server- or site-relative URL of the list. Specify either listTitle, listId, or listUrl, but not multiple. |
-p, --filePath [filePath] |
The absolute or relative path to a flat CSV file containing the list items. Specify either filePath or ids but not both. |
-i, --ids [ids] |
Comma separated list of list item IDs. Specify either filePath or ids but not both. |
--recycle |
Recycle the list items. Otherwise, they will be permanently deleted. |
-f, --force |
Don't prompt for confirmation. |
Examples
Remove a list of IDs from a list with a csv
m365 spo listitem batch remove --filePath ./IDlist.csv --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List"
Remove a list of IDs from a list by specifying the IDs
m365 spo listitem batch remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --ids "123,234,345"
Remarks
A sample CSV can be found below. The first line of the CSV-file should contain the internal column names that you wish to set.
Response
The command won't return a response on success.
Usage
m365 spo listitem batch remove [options]Description
Removes items from a list in batch
Options
-u, --webUrl <webUrl>-l, --listId [listId]-t, --listTitle [listTitle]--listUrl [listUrl]-p, --filePath [filePath]filePathoridsbut not both.-i, --ids [ids]filePathoridsbut not both.--recycle-f, --forceExamples
Remove a list of IDs from a list with a csv
m365 spo listitem batch remove --filePath ./IDlist.csv --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List"Remove a list of IDs from a list by specifying the IDs
Remarks
A sample CSV can be found below. The first line of the CSV-file should contain the internal column names that you wish to set.
Response
The command won't return a response on success.