Skip to content

Solution Report PageAssetsReport

Barbarur edited this page Jan 8, 2025 · 2 revisions

Page assets report

Solution Code: PageAssetsReport

Description

The folder Site Pages in the Library Site Assets usually includes the files, mainly images, uploaded directly to a page. Files are inside a separate folder per page. Unfortunately the folders name is the original name of the page, which in many time is a generic alphanumeric name given by SharePoint to the page until the user give a title to the page. Therefore it's difficult to map which folder belongs to which page. If the page is deleted, the folders is not deleted, leaving behind unused files on the site.

PageAssetsReport

Files that are currently used on existing pages will be added to this report. Information Included on this report:

Column Title Description
SiteUrl URL of the site where the page and site asset file is located.
PageTitle Title of the page where the site asset file is used.
PageUrl URL of the page where the site asset file is used.
PageCreated Time in UTC of the creation time of the page where the site asset file is used.
PageCreatedBy Email of the user who created the page where the site asset file is used.
PageModified Time in UTC of the last modification of the page where the site asset file is used.
PageModifiedBy Email of the user who last modified the page where the site asset file is used.
SiteAssetTitle Title of the site asset file used on the page.
SiteAssetId ID of the site asset file used on the page.
SiteAssetUrl URL of the site asset file used on the page.
Remarks Additional information
UnusedAssetsReport

Site asset files that are not used by any of the existing pages will be added on this repot. Information Included on this report:

Column Title Description
SiteUrl URL of the site where the page and site asset file is located.
SiteAssetTitle Title of the site asset file used on the page.
SiteAssetId ID of the site asset file used on the page.
SiteAssetUrl URL of the site asset file used on the page.
Remarks Additional information

Requirements

Run the solution with and account with at least SharePoint Admin role.

Parameters

How this Solution works

  1. Collects the required Sites.
  2. Add account as Site collection admin if required.
  3. Collects all Site pages.
  4. Collects all items under the folder Site Pages inside Site Assets.
  5. Cross-check if the items are found on any of the pages.
  6. Remove account as Site collection admin if required
  7. Records the information for each action in a CSV file.
Clone this wiki locally