Get SharePoint Documents Inventory Report with PowerShell

Requirement: Get all files in a SharePoint Document Library using PowerShell This PowerShell script generates a detailed report on the given SharePoint library’s inventory in addition to 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…

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 is time-consuming. Using the Central Administration export method also kills my time. Solution: We can copy and paste SharePoint…

Read more

Storage Analysis Report for SharePoint Document Library

Requirement: On a huge document library, We needed to analyze all documents stored and figure out what files are taking up the most space to move documents into individual libraries/folders, as this larger library causes latency issues. PowerShell script to generate storage metrics report on SharePoint library: Are you looking for a…

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

Copy SharePoint List or Library between Sites with PowerShell

In a migration project, we had to move a few lists and libraries to a different site collection. In SharePoint 2010, using granular export, we can export SharePoint lists and libraries from one site to another with the SharePoint Central Administration web interface. Once exported we’ve to use Import-SPWeb PowerShell cmdlet to…

Read more