Created
December 24, 2018 16:03
-
-
Save garrytrinder/9997a70723cf9d4b0d8240d6d09dbe04 to your computer and use it in GitHub Desktop.
Removes all list items from a SharePoint List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[Parameter(Mandatory=$true)] | |
[string]$ListName | |
) | |
Get-PnPListItem -List $ListName | ForEach-Object { Remove-PnPListItem -List $ListName -Identity $_ -Force; Write-Host "Removed item $($_.Id)" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment