Posts

Showing posts from December, 2014

Export all user permissions from a SharePoint 2010 Site to CSV

One of the requirement came to me to list down or export all users available on the site to .CSV format in a particular site collection with the properties like Group name, Permission Level, User id, Url, Item type (List, site, library) etc.. So below is the script to achieve the same.  Copy the code & save it in notepad with .ps1 extension & then run with powershell. (Dont forget to mention the url of site collection in the script) function Get-SPUserEffectivePermissions(     [object[]]$users,     [Microsoft.SharePoint.SPSecurableObject]$InputObject) {         begin { }     process {         $so = $InputObject         if ($so -eq $null) { $so = $_ }                 if ($so -isnot [Microsoft.SharePoint.SPSecurableObject]) {     ...