PowerShell – SharePoint – Move folders between site collections, subsites, and libraries

There are several ways to move data between libraries in SharePoint. One of them is using UI. While this method has become better over the years, it's still slow and buggy at times. Just recently I had an issue where SharePoint UI would not move more than 20 folders, it would time out.  Another method is using PowerShell to do such a task. Out there you can definitely find scripts that would move data; however, you need to provide all prerequisite information and do it correctly. A typo or a library display name vs different internal name would leave you scratching your head for quite some time. If you do use subsites in your site collections, then things become progressively more complicated. To address most of the struggle I decided to create a script that will do it all. The goal was to automate everything where an admin would only…

Continue ReadingPowerShell – SharePoint – Move folders between site collections, subsites, and libraries

PowerShell – SharePoint – Permission report for all lists and libraries within every site collection and subsite

Here is a script that comes very handy when you need to replace some SharePoint groups with other ones. While doing so you definitely want to make sure no one has lost access. So you need to know where each group has been used. To create this script I used Salaudeen Rajack's PnP PowerShell to Export Document Library Permissions in SharePoint Online script posted here (https://www.sharepointdiary.com/2019/02/sharepoint-online-pnp-powershell-to-export-document-library-permissions.html), then did some adjustments to it including converting it to a function. Then added my code to go through each site collection and subsite. What this script does and how it might be beneficial to you: goes through every site collection and subsite, then library and list; has a list of site collections to exclude; does not include Office 365 Group sites; outputs the following data - site/subsite URL, library/list title, user/group name, user/group type, permission level, how it's granted. This script might take…

Continue ReadingPowerShell – SharePoint – Permission report for all lists and libraries within every site collection and subsite