Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
PowerShell Script To Delete All Items Of SharePoint 2013
WhatsApp
Gowtham Rajamanickam
8y
16.6
k
0
0
25
Blog
Steps
Open your SharePoint Management Shell.
Copy the code given below and paste it.
Run the code given below.
Open your SharePoint site
Check if the execution completed successfully or not.
Code
$siteURL =
"https://gowtham.sharepoint.com/tutorial"
$ListName=
"Tutorials"
$site =
new
-
object
Microsoft.SharePoint.SPSite ($siteURL)
$web = $site.OpenWeb()
$oList = $web.Lists[$ListName];
$collListItems = $oList.Items;
$count = $collListItems.Count -1;
for
($intIndex = $count; $intIndex -ge 0; $intIndex--)
{
$collListItems[$intIndex].Delete();
}
Thanks for reading the blog.
PowerShell
SharePoint 2013
Up Next
Restore A Deleted Site Collection In SharePoint 2010 And 2013 On Premises Using PowerShell Command
Ebook Download
View all
Configure MinRole Search and Cloud Hybrid Features in SharePoint Server 2016 and Office 365
Read by 1.6k people
Download Now!
Learn
View all
Membership not found