문제

I am using PnP PowerShell to access the SharePoint Online environment.

How can I delete rows of a SharePoint list?

도움이 되었습니까?

해결책

I think this is what you are asking for:

Remove-PnPListItem -List "[Your list Title goes here]" -Identity ($TheItemId) 

다른 팁

You can delete a list item/row using below command:

Remove-PnPListItem -List "Demo List" -Identity "1"

Where -Identity is the ID of the list item, or actual ListItem object.

Microsoft Official Reference: Remove-PnPListItem

If you want to remove all items from a SharePoint Online list then check below reference:

Remove all items from a SharePoint Online list using PnP PowerShell

Additional Reference: Get-PnPListItem - Using this command first you can fetch the list items (single item or multiple items) and then you can delete the list item using above command.

You could use Get-PnPListItem get all items you want to delete, then you can use ListItem.DeleteObject method in the loop, or you could choose use Remove-PnPListItem in the loop.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top