How to Delete a Document Library in SharePoint using PowerShell?

Task: Delete document library in SharePoint with PowerShell How to Delete a Document Library in SharePoint? Document Libraries are used to store and manage Microsoft Office documents, PDF files, and other types of files within SharePoint. To delete a document library in SharePoint, follow these steps: Browse to your SharePoint Site Click…

Read more

Get SharePoint Documents Inventory Report with PowerShell

This PowerShell script generates detailed report on the given SharePoint library’s inventory in addition with its storage data. The output report contains: File Name File Size(KB) Versions Size(KB) Total File Size(KB) Created on Last Modified Created by Parent Folder URL SharePoint Document Library Inventory using PowerShell If you want to generate an…

Read more

Export-Import All Lists and Libraries from One Site to Another using PowerShell

The requirement is to copy and paste all SharePoint lists and libraries from one site to another. While “Save List as a Template” is one approach, it doesn’t work for larger lists, and it is time-consuming. Using the Central Administration export method also kills my time. Solution: We can copy and paste…

Read more

Storage Analysis Report for SharePoint Document Library

Requirement: On a very large document library, We needed to analyze all documents stored, in order to move documents into individual libraries/folders, as this larger library causing latency issues. Let’s use PowerShell script to analyze and generate a report on document library storage information: PowerShell script to generate storage metrics report on…

Read more

Enable Item-Level Permissions on Document Library in SharePoint using PowerShell

Requirement: Enable item level permissions in SharePoint document library. SharePoint Lists provide item level security options such as “Read items that were created by the user” or “Create items and edit items that were created by the user” under “Advanced Settings” page in SharePoint list settings. But you don’t get these options…

Read more

Copy Attachment from SharePoint List to Document Library using SharePoint Designer – PowerShell

Requirement: Copy Attachments from SharePoint List to Document Library How to copy attachment from list to document library in SharePoint? SharePoint keeps attachments under “List >> Attachments >> ‘List Item ID’” folder path. So, if you want to copy an attachment from list to document library, follow these steps: Open your SharePoint…

Read more

Backup and Restore (Export-Import) Lists in SharePoint 2013 using PowerShell

Requirement: Backup and restore a SharePoint 2013 list between sites. Solution: While saving a list as template, including its content is one solution, it doesn’t work for lists larger  than 50 MB! So, follow below steps to export-import lists in SharePoint 2013 using PowerShell. Export a SharePoint list using PowerShell: Use Export-SPWeb…

Read more

Download All Files From a SharePoint Library Programmatically using PowerShell

Ever wanted to download all files from a SharePoint Library (Document Library, Picture Library, etc.) to your local drive? While downloading a single file or document is fairly straightforward by clicking “Download a Copy” from the documents tab of the Ribbon or From the ECB Menu of the document  >> Send To…

Read more

How to Change SharePoint List or Library Settings Programmatically with PowerShell?

There is a requirement to change the SharePoint document library draft item security on all document libraries in a sub-site. We used to achieve it by going to: Document Library settings >> Versioning Settings. Change “Draft Item Security” from “Any user who can read items (default setting)” to “Only users who can…

Read more