Thursday, May 12, 2016

Get content and security permissions for one SharePoint library

This will be a short blog. Did you ever have to list all files and security rights for one of the libraries? If no, you never had to deal with people from audit or security department, you lucky bastards :-)

Anyway, if you have one or several important document libraries, especially with bunch of folders, sub-folders, each one with different security permissions, preparing report for security guys can be real pain in the neck if you have to check everything manually. Lucky for us there is PowerShell to make our life easier.

I found several scripts which gets you permissions for all sites and all the libraries, and they are not bad, but it takes them forever to finish. Also they will provide you with a pile of unnecessary data, which you need to put in order later. Likewise, almost all of them collect up to library permissions and do not check folder permissions inside the libraries.

That is the reason I have created small script which will list you all the content and permissions for just one library. Result display is not among most pretty, but it serves the purpose.

Get-SPListFolderPermissions.ps1

Script will provide you folder url, folder security rights as well as names of all items inside it. Also files located in library root will be displayed with their security permissions.


by Krsto Savic via Everyone's Blog Posts - SharePoint Community

No comments:

Post a Comment