Introduction
In this blog, you will learn how to export all pages (.aspx) from SharePoint on-premises site collection to CSV files using PowerShell.
Steps Involved
Perform the following steps to run the PowerShell script to export all pages (.aspx) from SharePoint on-premises site collection to a CSV file.
- Unzip the GetAllPages folder.
- Open the InputSites.csv file and update the SharePoint site URLs.
- Save InputSites.csv file.
- Open PowerShell.
- Navigate to the GetAllPages folder. Run the following command.
.\GetAllPages.ps1
Result
PageCount.csv and PageDetails.csv files are created in the same directory.
PageCount.csv
![Page Count]()
PageDetails.csv
![Page Details Site url]()
Summary
This blog describes how to export all pages (.aspx) from SharePoint on-premises site collection to CSV file using PowerShell.