Export All ASPX Pages from SharePoint On-Premises Using PowerShell

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.

  1. Unzip the GetAllPages folder.
  2. Open the InputSites.csv file and update the SharePoint site URLs.
  3. Save InputSites.csv file.
  4. Open PowerShell.
  5. 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.