Commands › SharePoint Online

Copy-SPOPersonalSitePage

SharePoint Online Microsoft.Online.SharePoint.PowerShell Copy-*

This cmdlet command allows you to relocate existing SharePoint pages by utilizing an existing copy operation. We will also copy any assets associated with the SharePoint pages to the new destination. We offer two methods for relocating pages: - Copy: This method keeps the original page intact while creating a duplicate at the new location. - Move: This method creates a new copy at the new location and deletes the original page from the source.

Quick start script

# Copy-SPOPersonalSitePage — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Copy-SPOPersonalSitePage -DestinationSite <SpoSitePipeBind> -PageName <String> -SourceSite <SpoSitePipeBind> | Format-List

# 3. Export for evidence / drift tracking
Copy-SPOPersonalSitePage | Export-Clixml .\SPOPersonalSitePage-$(Get-Date -Format yyyyMMdd).xml

Syntax

Copy-SPOPersonalSitePage -SourceSite <SpoSitePipeBind> -DestinationSite <SpoSitePipeBind> -PageName <String>
 [-DeleteSourcePage] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-DeleteSourcePage SwitchParameter Indicates whether to delete the source SharePoint page(s) after copying. If specified, the operation will move the SharePoint page(s) instead of copying.
-DestinationSite SpoSitePipeBind yes Specifies the URL of the destination SharePoint site where the SharePoint pages will be copied to.
-PageName String yes Specifies the name of the SharePoint page to copy. This parameter is required when not using the `-AllPages` switch. Note that `-PageName` refers to the name of a SharePoint page that ends with the suffix .aspx, such...
-SourceSite SpoSitePipeBind yes Specifies the URL of the source SharePoint site containing the SharePoint pages to copy.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.