How to Export SharePoint 2010 Sites and Users with Full Control Using PowerShell
Question details
The user needs a PowerShell method to list and export all SharePoint Server 2010 site collections, subsites, and users who have Full Control or higher permissions.

- Product
- SharePoint Server 2010
- Device & OS
- not provided
- Scenario
- Administrating a SharePoint 2010 farm, auditing user access permissions, and exporting the hierarchy to a report format.
- Observed behavior
- The user seeks a programmatic approach to extract site and permission data into a manageable format like CSV for compliance and auditing purposes.
Ensure you have farm administrator privileges and can access the SharePoint 2010 Management Shell locally on the server hosting your SharePoint environment.
Use SharePoint 2010 Management Shell to Enumerate and Export Data
Utilize the server-side PowerShell object model to iterate through site collections, webs, and role assignments, then export the data to CSV.
Because permission inheritance and farm configurations vary significantly across organizations, a generic script requires careful testing in your specific environment.
The standard approach involves looping through 'Get-SPSite' and 'Get-SPWeb', then inspecting the 'RoleAssignments' property to identify users with the 'Full Control' permission level.
Log into your SharePoint server as a Farm Administrator and launch the SharePoint 2010 Management Shell.
Use the cmdlet Get-SPSite -Limit All to gather every site collection available in the farm.
For each site collection, loop through the $_.AllWebs property to access both the top-level sites and any nested subsites.
Examine the $web.RoleAssignments property to find specific users or groups assigned to the Full Control role definition.
Pipe your formatted output objects into the Export-Csv cmdlet (e.g., Export-Csv -Path 'C:\SharePointPermissions.csv' -NoTypeInformation) for easy viewing in a spreadsheet program.

Analyze Your Exported CSV Reports with WPS Office
After exporting your SharePoint 2010 permission data, use WPS Spreadsheet to open, filter, and analyze your CSV reports seamlessly. WPS Office is a robust, free alternative to Microsoft Office that easily handles large datasets and auditing logs.
- 1. Open WPS Spreadsheet: Launch the WPS Office suite and click on the Spreadsheet application.
- 2. Import your CSV file: Go to Menu > Open, navigate to the folder where you saved your SharePoint PowerShell export, and select the CSV file.
- 3. Filter the data: Highlight your headers and select the Data tab, then click Filter to easily sort through users and sites.

Frequently Asked Questions
Can I use the SharePoint Online Management Shell for this task?
No. The SharePoint Online Management Shell is exclusively designed for Microsoft 365 cloud environments. For SharePoint Server 2010, you must use the local SharePoint 2010 Management Shell installed directly on the server.
Why are some users missing from the Full Control export report?
If permissions are granted through Active Directory (AD) groups rather than directly to individual user accounts, the script will output the AD Group name instead of the individual users. You would need to add an AD-querying module to expand those groups.
How do I handle subsites that inherit permissions from the parent site?
You can check the $web.HasUniqueRoleAssignments property in your PowerShell script. If it returns false, the subsite inherits its permissions from the parent site, meaning you do not necessarily need to record them as distinct role assignments.




