Skip to content

Delete items from SharePoint list using Powershell

November 12, 2018

$Web = Get-SPWeb $Url
$List = $Web.lists[$ListName]
if($List -eq $null){
Write-Error “The List cannot be found”;return
Write-Warning “Deleting all list items from $($ListName)”
$Items = $List.GetItems()
$Items | ForEach-Object{


From → General, PowerShell

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: