Sunday 6 November 2016

Export list of all Web applications, Site Collections and their sub sites and their List/library and their columns in a sharepoint farm


Today I am Providing the Power Shell Script that will create a csv file that contain the list of all Web applications, Site Collections and their sub sites and their List/library and their columns in current SharePoint farm where the script will be executed.

Script will accept the reports file path where it will generate the csv files with following names -

Inputs - Following are the Input for the script.

Report File Path - Path for saving the files.
Report Type - Select for the types of the reports.
W for Web Applications
SC for Site Collections
SS for Sub Sites
L for Lists
C for Columns

I for Items
A for All Reports
Outputs - Following output files will be generated on provided Report File Path and Report Type.
Webapplications.csv - List of all Web applications
Sitecollection.csv - List of All site collections of all the Web Applications
Subsites.csv - List of All Sub Sites of All Site Collections of all the Web Applications
Lists.csv - List of All lists of All Sub Sites of All Site Collections of all the Web Applications 
Columns.csv - List of all Columns of All lists of All Sub Sites of All Site Collections of all the Web Applications
List of items will be crated with the name of the their respective list/library in their respective folder according to their respective site URL in the given path.

Dependencies -
For executing this script user must be added in site collection administrators in all the sites.
User should have Shell Admin rights to run the scripts.
Run Management Shell as an Administrator. 
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Management Shell.
Follow on screen instructions.


FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.

No comments:

Post a Comment