Skip to content

Commit e78f43d

Browse files
authored
Merge pull request #673 from bellesirapha/main
Add public documentation for page move IT-facing solution
2 parents c7e19ab + 255f874 commit e78f43d

File tree

2 files changed

+322
-0
lines changed

2 files changed

+322
-0
lines changed
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
---
2+
external help file: sharepointonline.xml
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/copy-spopersonalsitepage
5+
applicable: SharePoint Online
6+
title: Copy-SPOPersonalSitePage
7+
schema: 2.0.0
8+
author: xuyangzo
9+
ms.author: xuyangzou
10+
ms.reviewer:
11+
---
12+
13+
# Copy-SPOPersonalSitePage
14+
15+
## SYNOPSIS
16+
17+
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:
18+
- Copy: This method keeps the original page intact while creating a duplicate at the new location.
19+
- Move: This method creates a new copy at the new location and deletes the original page from the source.
20+
21+
## SYNTAX
22+
23+
```powershell
24+
Copy-SPOPersonalSitePage -SourceSite <SpoSitePipeBind> -DestinationSite <SpoSitePipeBind> -PageName <String> -DeleteSourcePage <SwitchParameter> [-Confirm] [<CommonParameters>]
25+
```
26+
27+
## DESCRIPTION
28+
29+
The Copy-SPOPersonalSitePage cmdlet allows a SharePoint Administrator to copy one or more SharePoint pages from a selected source to a chosen destination SharePoint site. If the `-DeleteSourcePage` parameter is set to `$true`, the source page(s) will be deleted after the copy operation, effectively moving the page(s).
30+
31+
> [!NOTE]
32+
> This cmdlet may not be available in all tenants as the feature rollout could be in progress. If the feature has not been enabled in your tenant, attempting to run this cmdlet will result in an error.
33+
34+
**Where can I move the existing page(s) to and from?**
35+
36+
| Source | Destination |
37+
| :------------------- | :---------- |
38+
| SharePoint pages library in OneDrive for Business | SharePoint pages library in OneDrive for Business |
39+
| SharePoint pages library in OneDrive for Business | SharePoint site |
40+
| SharePoint site | SharePoint site |
41+
42+
**How do I query the status of my copy operation?**
43+
44+
After this cmdlet is executed, you'll receive the following information:
45+
46+
| Property | Description |
47+
| :------- | :---------- |
48+
| ErrorMessage | We will show the corresponding error message, if any error occurs. |
49+
| JobState | The current state of the job. |
50+
| NewPageUrl | The URL of the new page if the copy operation has completed. |
51+
| SourcePageName | The name of the source page to be copied. |
52+
| StatusMessage | A message describing the current status. |
53+
| WorkItemId | The work item ID used to track the status of the copy job. If the copy operation is complete, this will be `00000000-0000-0000-0000-000000000000`. |
54+
55+
- If the copy is successful, the URL for the new page will be provided.
56+
- If the copy is still in progress, you will receive the work item ID. You can use the [Get-SPOPersonalSitePageCopyProgress](./Get-SPOPersonalSitePageCopyProgress.md) command to check the status of the URL.
57+
58+
The following table explains the copy job's state:
59+
60+
| Status | Explanation |
61+
| :---------- | :---------- |
62+
| Queued | The copy operation was queued for execution. |
63+
| CreateAssetsFolderStart | We've started creating a folder to place all associated assets used on this page. |
64+
| CreateAssetsFolderEnd | We've finished creating a folder to place all associated assets used on this page. |
65+
| CopyAssetsStart | We've started copying associated assets used on this page. |
66+
| CopyAssetsEnd | We've finished copying associated assets used on this page. |
67+
| CreatePageStart | We've started creating a new page. |
68+
| CreatePageEnd | We've finished creating a new page. |
69+
| Succeeded | The copy operation was successful. |
70+
| Deleting | The copy operation was deleted. |
71+
| Failed | The copy operation failed. |
72+
| JobNotFound | The copy operation wasn't found. |
73+
74+
## EXAMPLES
75+
76+
### -----------------------EXAMPLE 1-----------------------------
77+
78+
```powershell
79+
Copy-SPOPersonalSitePage -SourceSite 'https://contoso-my.sharepoint.com/personal/testuser_onmicrosoft_com' -DestinationSite 'https://contoso.sharepoint.com/sites/testsite' -PageName 'TestPage.aspx' -Confirm
80+
```
81+
82+
Example 1 demonstrates how a SharePoint Administrator can copy the SharePoint page named `TestPage.aspx` from `testuser`'s SharePoint pages library in OneDrive for Business to the `testsite` SharePoint site with confirmation. The source page will not be deleted.
83+
84+
### -----------------------EXAMPLE 2-----------------------------
85+
86+
```powershell
87+
Copy-SPOPersonalSitePage -SourceSite 'https://contoso-my.sharepoint.com/personal/testuser_onmicrosoft_com' -DestinationSite 'https://contoso.sharepoint.com/sites/testsite' -PageName 'TestPage.aspx' -DeleteSourcePage
88+
```
89+
90+
Example 2 demonstrates how a SharePoint Administrator can move the SharePoint page named `TestPage.aspx` from `testuser`'s SharePoint pages library in OneDrive for Business to the `testsite` SharePoint site. The source page will be deleted after the copy operation.
91+
92+
### -----------------------EXAMPLE 3-----------------------------
93+
94+
```powershell
95+
Copy-SPOPersonalSitePage -SourceSite 'https://contoso.sharepoint.com/sites/sourcesite' -DestinationSite 'https://contoso.sharepoint.com/sites/testsite' -PageName 'TestPage.aspx' -DeleteSourcePage -Confirm
96+
```
97+
98+
Example 3 demonstrates how a SharePoint Administrator can copy the SharePoint page named `TestPage.aspx` from a SharePoint site name `sourcesite` to the `testsite` SharePoint site with confirmation. The source page will be deleted after the copy operation.
99+
100+
### -----------------------EXAMPLE 4-----------------------------
101+
102+
```powershell
103+
Copy-SPOPersonalSitePage -SourceSite 'https://contoso-my.sharepoint.com/personal/testuser1_onmicrosoft_com' -DestinationSite 'https://contoso-my.sharepoint.com/personal/testuser2_onmicrosoft_com' -PageName 'TestPage.aspx' -DeleteSourcePage -Confirm
104+
```
105+
106+
Example 4 demonstrates how a SharePoint Administrator can move the SharePoint page named `TestPage.aspx` from `testuser1`'s SharePoint pages library in OneDrive for Business to `testuser2`'s SharePoint pages library in OneDrive for Business with confirmation. The source page will be deleted after the copy operation.
107+
108+
## PARAMETERS
109+
110+
### -SourceSite
111+
112+
Specifies the URL of the source SharePoint site containing the SharePoint pages to copy.
113+
114+
```yaml
115+
Type: SpoSitePipeBind
116+
Parameter Sets: (All)
117+
Aliases:
118+
Applicable: SharePoint Online
119+
120+
Required: True
121+
Position: Named
122+
Default value: None
123+
Accept pipeline input: False
124+
Accept wildcard characters: False
125+
```
126+
127+
### -DestinationSite
128+
129+
Specifies the URL of the destination SharePoint site where the SharePoint pages will be copied to.
130+
131+
```yaml
132+
Type: SpoSitePipeBind
133+
Parameter Sets: (All)
134+
Aliases:
135+
Applicable: SharePoint Online
136+
137+
Required: True
138+
Position: Named
139+
Default value: None
140+
Accept pipeline input: False
141+
Accept wildcard characters: False
142+
```
143+
144+
### -PageName
145+
146+
Specifies the name of the SharePoint page to copy. This parameter is required when not using the `-AllPages` switch.
147+
148+
```yaml
149+
Type: String
150+
Parameter Sets: (All)
151+
Aliases:
152+
Applicable: SharePoint Online
153+
154+
Required: True
155+
Position: Named
156+
Default value: None
157+
Accept pipeline input: False
158+
Accept wildcard characters: False
159+
```
160+
161+
### -DeleteSourcePage
162+
163+
Indicates whether to delete the source SharePoint page(s) after copying. If specified, the operation will move the SharePoint page(s) instead of copying.
164+
165+
```yaml
166+
Type: SwitchParameter
167+
Parameter Sets: (All)
168+
Aliases:
169+
Applicable: SharePoint Online
170+
171+
Required: True
172+
Position: Named
173+
Default value: None
174+
Accept pipeline input: False
175+
Accept wildcard characters: False
176+
```
177+
178+
### -Confirm
179+
180+
Prompts for confirmation before executing the command.
181+
For more information, type the following command: `get-help about_commonparameters`
182+
183+
```yaml
184+
Type: SwitchParameter
185+
Parameter Sets: (All)
186+
Aliases: cf
187+
Applicable: SharePoint Online
188+
189+
Required: False
190+
Position: Named
191+
Default value: None
192+
Accept pipeline input: False
193+
Accept wildcard characters: False
194+
```
195+
196+
### CommonParameters
197+
198+
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
199+
200+
## Notes
201+
202+
**Question: Will SharePoint pages retain their version history after the move?**
203+
204+
Answer: Currently, only the latest published version will be transferred.
205+
206+
**Question: Can recipients of SharePoint pages I shared with continue to access them after the move?**
207+
208+
Answer: All permissions will be removed once the pages are moved.
209+
210+
## RELATED LINKS
211+
212+
[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
external help file: sharepointonline.xml
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-spopersonalsitepagecopyprogress
5+
applicable: SharePoint Online
6+
title: Get-SPOPersonalSitePageCopyProgress
7+
schema: 2.0.0
8+
author: xuyangzo
9+
ms.author: xuyangzou
10+
ms.reviewer:
11+
---
12+
13+
# Get-SPOPersonalSitePageCopyProgress
14+
15+
## SYNOPSIS
16+
17+
This cmdlet enables you to track the progress of a SharePoint page's copy operation.
18+
19+
## SYNTAX
20+
21+
```powershell
22+
Get-SPOPersonalSitePageCopyProgress -DestinationSite <SpoSitePipeBind> -WorkItemId <Guid> [<CommonParameters>]
23+
```
24+
25+
## DESCRIPTION
26+
27+
After this cmdlet is executed, you'll receive the following information:
28+
29+
| Property | Description |
30+
| :------- | :---------- |
31+
| ErrorMessage | The error message if there is an error. |
32+
| JobState | The state of the job. |
33+
| NewPageUrl | The URL of the new page if the copy is already finished. |
34+
| SourcePageName | The name of the source page to copy. Will be empty. |
35+
| StatusMessage | The message to describe the status. |
36+
| WorkItemId | The work item id to track the status of the copy job if the copy job is in progress. |
37+
38+
The following table explains the copy job's state:
39+
40+
| Status | Explanation |
41+
| :---------- | :---------- |
42+
| Queued | The copy operation was queued for execution. |
43+
| CreateAssetsFolderStart | We've started creating a folder to place all associated assets used on this page. |
44+
| CreateAssetsFolderEnd | We've finished creating a folder to place all associated assets used on this page. |
45+
| CopyAssetsStart | We've started copying associated assets used on this page. |
46+
| CopyAssetsEnd | We've finished copying associated assets used on this page. |
47+
| CreatePageStart | We've started creating a new page. |
48+
| CreatePageEnd | We've finished creating a new page. |
49+
| Succeeded | The copy operation was successful. |
50+
| Deleting | The copy operation was deleted. |
51+
| Failed | The copy operation failed. |
52+
| JobNotFound | The copy operation wasn't found. |
53+
54+
## EXAMPLES
55+
56+
### -----------------------EXAMPLE 1-----------------------------
57+
58+
```powershell
59+
Get-SPOPersonalSitePageCopyProgress -DestinationSite 'https://contoso.sharepoint.com/sites/testsite' -WorkItemId 1a95eb18-f68d-4dd4-9aaf-b47cf05cf02a
60+
```
61+
62+
Example 1 shows how a SharePoint Administrator can check the status of a copy operation using a work item ID.
63+
64+
65+
## PARAMETERS
66+
67+
### -DestinationSite
68+
69+
Specifies the URL of the destination SharePoint site to which the SharePoint page has been copied to.
70+
71+
```yaml
72+
Type: SpoSitePipeBind
73+
Parameter Sets: (All)
74+
Aliases:
75+
Applicable: SharePoint Online
76+
77+
Required: True
78+
Position: Named
79+
Default value: None
80+
Accept pipeline input: False
81+
Accept wildcard characters: False
82+
```
83+
84+
### -WorkItemId
85+
86+
Specifies the GUID of the work item created for the copy job if it is asynchronous.
87+
88+
```yaml
89+
Type: Guid
90+
Parameter Sets: (All)
91+
Aliases:
92+
Applicable: SharePoint Online
93+
94+
Required: True
95+
Position: Named
96+
Default value: None
97+
Accept pipeline input: False
98+
Accept wildcard characters: False
99+
```
100+
101+
### CommonParameters
102+
103+
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
104+
105+
106+
## RELATED LINKS
107+
108+
[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)
109+
110+
[Copy-SPOPersonalSitePage.md](./Copy-SPOPersonalSitePage.md)

0 commit comments

Comments
 (0)