Microsoft 365 Migration

How to Fix PowerShell Not Copying All SharePoint Page Content

Khadija KhanKhadija Khan Oct 28, 2026 868 views

Question details

The user needs to resolve an issue where a PowerShell migration script misses specific SharePoint page elements like themes, banners, and call-to-action sections.

How to Fix PowerShell Not Copying All SharePoint Page Content
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Migrating SharePoint pages and content using a customized PowerShell script.
Observed behavior
The script successfully copies most files and pages, but fails to copy the theme, a banner, and a call-to-action section. Additionally, some internal links still point to the original source site.
Before you start

Ensure you have the latest version of the SharePoint Online Management Shell installed and verify that your user account has SharePoint Administrator permissions.

Solution 1Recommended

Consult the Microsoft Q&A SharePoint Customization Forum

Since this involves a custom PowerShell script, the best approach is to get tailored advice from Microsoft's developer community.

Custom PowerShell scripts often require specific modules or API calls to handle intricate page components like custom web parts, themes, and link rewriting during a migration.

1
Gather script details

Copy your custom PowerShell script and sanitize it by removing any sensitive credentials or tenant URLs.

2
Navigate to Microsoft Q&A

Open your web browser and go to the Microsoft Q&A website, then search for the SharePoint Customization tag.

3
Post your question

Create a new thread detailing the missing components (themes, banners, CTA) and the link redirection issue, pasting your sanitized script for community review.

Consult the Microsoft Q&A SharePoint Customization Forum
Script Handling: Mentioning the specific web parts (like Hero web parts or Call to Action) will help the community provide the exact PnP PowerShell commands you need.
Free Microsoft Office alternative

Manage Your Documents Effectively with WPS Office

While SharePoint handles complex site migrations, WPS Office is the perfect lightweight alternative for managing, editing, and sharing your everyday documents. Enjoy high compatibility with Microsoft Office formats without the hefty subscription fees.

  1. 1. Download WPS Office: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the software: Run the downloaded installer and follow the on-screen instructions to set up WPS Office on your computer.
  3. 3. Open and edit files: Launch WPS Office and open your migrated Word, Excel, or PowerPoint files to continue working seamlessly.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight software that runs smoothly on almost any device.Built-in PDF editing tools to easily convert and manage documents.Free to download and use with a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my SharePoint links still point to the old site after migration?

When migrating pages using standard file-copy commands in PowerShell, the hardcoded URLs inside text or web parts are not automatically updated. You need to use specific PnP PowerShell commands or implement script logic that finds and replaces the source URL with the destination URL.

Can PowerShell copy SharePoint modern page themes?

Yes, but it requires applying the theme settings explicitly to the destination site using cmdlets like 'Set-PnPWebTheme' or 'Invoke-PnPTenantTemplate'. Standard page copy commands often only copy the page content, not the site-level theme settings.

What is the best way to migrate SharePoint modern pages via script?

For custom scripts, utilizing the PnP.PowerShell module (specifically commands like Export-PnPPage and Invoke-PnPSiteTemplate) is highly recommended. For extremely complex migrations, official tools like the SharePoint Migration Tool (SPMT) might be more reliable than a custom script.