Skip to content

Commit 803fa71

Browse files
authored
Merge pull request MicrosoftDocs#1340 from wenhua-helen/master
Update SPMT PowerShell help documents
2 parents 2ff2503 + 976936b commit 803fa71

9 files changed

+185
-151
lines changed

spmt/spmt-ps/spmt/Add-SPMTTask.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
---
2-
external help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
2+
External help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
33
Module Name: Microsoft.SharePoint.MigrationTool.PowerShell
4-
applicable: SharePoint Migration Tool
5-
title: Add-SPMTTask
6-
online version:
7-
schema: 2.0.0
4+
Applicable: SharePoint Migration Tool
5+
Title: Add-SPMTTask
6+
Online version:
7+
Schema: 2.0.0
88
---
99

1010
# Add-SPMTTask
1111

1212
## SYNOPSIS
13-
Add a new migration task to the registered migration session. Currently there are three different types of tasks allowed: File share task, SharePoint task and a JSON defined task.
13+
Add a new migration task to the registered migration session. Currently there are three different types of tasks allowed: File Share task, SharePoint task and JSON defined task.
1414
## SYNTAX
1515

1616
### FileShare
1717
```
18-
Add-SPMTTask -FileShareSource <String> -TargetSiteUrl <String> -TargetList <String>
19-
[-TargetListRelativePath <String>]
18+
Add-SPMTTask -FileShareSource <String> -TargetSiteUrl <String> -TargetList <String> [-TargetListRelativePath <String>]
2019
```
2120
### SharePointMigrateAll
2221
```
@@ -25,37 +24,38 @@ Add-SPMTTask -SharePointSourceCredential <PSCredential> -SharePointSourceSiteUrl
2524

2625
### SharePointMigrateSelected
2726
```
28-
Add-SPMTTask -SharePointSourceSiteUrl <string> -SharePointSourceCredential <pscredential> -SourceList <string> [-SourceListRelativePath <string>] -TargetSiteUrl <string> -TargetList <string> [-TargetListRelativePath <string>]
27+
Add-SPMTTask -SharePointSourceSiteUrl <string> -SharePointSourceCredential <PSCredential> -SourceList <string> [-SourceListRelativePath <string>] -TargetSiteUrl <string> -TargetList <string> [-TargetListRelativePath <string>]
2928
```
3029

3130
### Json
3231
```
33-
Add-SPMTTask [-JsonDefinition <string>]
34-
Add-SPMTTask -SharePointSourceCredential <PSCredential> [-JsonDefinition <string>]
35-
Json defined migration task sample 1:
36-
Customer scenario:migrate data from File Share or local disk to SPO.
32+
Add-SPMTTask [-JsonDefinition <string>] # This cmdlet is for File Share migration
33+
34+
Add-SPMTTask -SharePointSourceCredential <PSCredential> [-JsonDefinition <string>] # This cmdlet is for SharePoint migration
35+
36+
Json sample for File Share migration:
37+
{
38+
"SourcePath":"\\LocalOrFileShareDataSource",
39+
"TargetPath":"https://YourTargetSite",
40+
"TargetList":"Documents",
41+
"TargetListRelativePath":"subfolder"
42+
}
43+
44+
Json sample for SharePoint migration(lists only):
3745
{
38-
"SourcePath":"\\LocalOrFileShareDataSource",
39-
"TargetPath":"https://YourTargetSite",
40-
"TargetList":"Documents",
41-
"TargetListRelativePath":"subfolder"
42-
}
43-
Json defined migration task sample 2:
44-
Customer scenario:migrate on-prem site to SPO site.
45-
{
4646
"SourcePath":"http://YourOnPremSite",
4747
"TargetPath":"https://YourTargetSite",
48-
"Items":{
49-
"Lists":[
50-
{
48+
"Items":{
49+
"Lists":[
50+
{
5151
"SourceList":"sourceListName",
5252
"TargetList":"targetListName"
53-
}
53+
}
5454
]
5555
}
5656
}
57-
Json defined migration task sample 3:
58-
Customer scenario:migrate on-prem sites with subsites to SPO.
57+
58+
Json sample for SharePoint migration(lists and subsites):
5959
{
6060
"SourcePath":"http://YourOnPremSite",
6161
"TargetPath":"https://YourTargetSite",
@@ -84,23 +84,23 @@ Customer scenario:migrate on-prem sites with subsites to SPO.
8484
]
8585
}
8686
}
87-
Json defined migration task sample 4:
88-
Customer scenario:migrate on-prem subsite to SPO subsite.
89-
{
90-
"SourcePath":"http://youronpremsite/subsite2",
91-
"TargetPath":"https://yourtargetsite/targetSubSite2"
92-
}
87+
88+
Json sample for SharePoint migration(whole site):
89+
{
90+
"SourcePath":"http://youronpremsite/subsite2",
91+
"TargetPath":"https://yourtargetsite/targetSubSite2"
92+
}
9393
```
9494

9595
## DESCRIPTION
9696
Add a new migration task to the registered migration session.
97-
Currently there are three different types of tasks allowed: File share task, SharePoint task and a JSON defined task.
97+
Currently there are three different types of tasks allowed: File Share task, SharePoint task and JSON defined task.
9898

9999
## EXAMPLES
100100

101101
### Example 1
102102
```
103-
#Define On-prem SharePoint 2013 data source#
103+
#Define SharePoint 2013 data source#
104104
105105
$Global:SourceSiteUrl = "http://YourOnPremSite/"
106106
$Global:OnPremUserName = "Yourcomputer\administrator"
@@ -116,23 +116,25 @@ $Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText
116116
$Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
117117
$Global:TargetListName = "TargetListName"
118118
119-
#Define Fileshare data source#
119+
#Define File Share data source#
120120
$Global:FileshareSource = "YourFileShareDataSource"
121+
121122
#Import SPMT Migration Module#
122123
Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
124+
123125
#Register the SPMT session with SPO credentials#
124126
Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
125-
#Add two tasks into the session. One on-prem and one file share task.#
127+
128+
#Add two tasks into the session. One is SharePoint migration task, and another is File Share migration task.#
126129
Add-SPMTTask -SharePointSourceCredential $Global:SPCredential -SharePointSourceSiteUrl $Global:SourceSiteUrl -TargetSiteUrl $Global:SPOUrl -MigrateAll
127-
Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList "Documents"
130+
Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList $Global:TargetListName
128131
```
129-
130-
Add one file share migration task and one on-prem 2013 migration task to registered migration session.
132+
Add one File Share migration task and one SharePoint 2013 migration task to the registered migration session.
131133

132134
## PARAMETERS
133135

134136
### -FileShareSource
135-
This parameter is mandatory for file share migration. Please specify the source folder path. For example: C:\SourceFiles.
137+
This parameter is mandatory for File Share migration. Please specify the source folder path. For example: C:\SourceFiles.
136138

137139
```yaml
138140
Type: String
@@ -176,8 +178,8 @@ Accept pipeline input: False
176178
Accept wildcard characters: False
177179
```
178180
179-
### -SharePointSourceCredential
180-
This is a switch parameter. If set to True, all lists will be migrated. If set to False, the customer will migrate selected lists.
181+
### -SharePointSourceCredential
182+
Use this parameter to define SharePoint 2013 sign-in credentials.
181183
182184
```yaml
183185
Type: PSCredential
@@ -219,7 +221,7 @@ Accept wildcard characters: False
219221
```
220222
221223
### -SourceList
222-
This parameter is mandatory and defines source document library name or list name.
224+
This parameter is mandatory and is to define source document library name or list name.
223225
224226
```yaml
225227
Type: String
@@ -234,7 +236,7 @@ Accept wildcard characters: False
234236
```
235237
236238
### -SourceListRelativePath
237-
This parameter is optional and is to define one or more migration data source relative paths.
239+
This parameter is optional and is to define data source relative path.
238240
239241
```yaml
240242
Type: String
@@ -249,7 +251,7 @@ Accept wildcard characters: False
249251
```
250252
251253
### -TargetList
252-
This parameter is mandatory and defines target library name or list name.
254+
This parameter is mandatory and is to define target library name or list name.
253255
254256
```yaml
255257
Type: String
@@ -264,8 +266,7 @@ Accept wildcard characters: False
264266
```
265267
266268
### -TargetListRelativePath
267-
This parameter is optional. You can define one or more target relative paths in a list and make the value to this parameter.
268-
269+
This parameter is optional and is to define target relative path.
269270
```yaml
270271
Type: String
271272
Parameter Sets: FileShare, SharePointMigrateSelected
@@ -279,7 +280,7 @@ Accept wildcard characters: False
279280
```
280281
281282
### -TargetSiteUrl
282-
This parameter is mandatory for both file share and on-prem migration and defines the target site URL.
283+
This parameter is mandatory for both File Share and SharePoint migration and is to define the target site URL.
283284
284285
```yaml
285286
Type: String
@@ -305,4 +306,3 @@ Accept wildcard characters: False
305306
## NOTES
306307
307308
## RELATED LINKS
308-
Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
---
2-
external help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
2+
External help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
33
Module Name: Microsoft.SharePoint.MigrationTool.PowerShell
4-
applicable: SharePoint Migration Tool
5-
title: Get-SPMTMigration
6-
online version:
7-
schema: 2.0.0
4+
Applicable: SharePoint Migration Tool
5+
Title: Get-SPMTMigration
6+
Online version:
7+
Schema: 2.0.0
88
---
99

1010
# Get-SPMTMigration
1111

1212
## SYNOPSIS
13-
Return object of current session. It includes current tasks status and current session level settings.
13+
Return the object of current session. It includes current tasks status and current session level settings.
1414
The status of current tasks includes
1515
1. Count of scanned files
1616
2. Count of migrated files
17-
3. Migration error message if there is any.
17+
3. Migration error message if there is any.
18+
19+
......
1820

1921
## SYNTAX
2022

2123
```
22-
24+
Get-SPMTMigration
2325
```
2426

2527
## DESCRIPTION
@@ -28,8 +30,7 @@ Return object of current session. It includes current tasks status and current s
2830

2931
### Example 1
3032
```
31-
#Define On-prem SharePoint 2013 data source#
32-
33+
#Define SharePoint 2013 data source#
3334
$Global:SourceSiteUrl = "http://YourOnPremSite/"
3435
$Global:OnPremUserName = "Yourcomputer\administrator"
3536
$Global:OnPremPassword = ConvertTo-SecureString -String "OnPremPassword" -AsPlainText -Force
@@ -44,20 +45,26 @@ $Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText
4445
$Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
4546
$Global:TargetListName = "TargetListName"
4647
47-
#Define Fileshare data source#
48+
#Define Fileshare data source#
4849
$Global:FileshareSource = "YourFileShareDataSource"
50+
4951
#Import SPMT Migration Module#
5052
Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
53+
5154
#Register the SPMT session with SPO credentials#
5255
Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
53-
#Add two tasks into the session. One on-prem and one file share task.#
56+
57+
#Add two tasks into the session. One is SharePoint migration task, and another is File Share migration task.#
5458
Add-SPMTTask -SharePointSourceCredential $Global:SPCredential -SharePointSourceSiteUrl $Global:SourceSiteUrl -TargetSiteUrl $Global:SPOUrl -MigrateAll
55-
Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList "Documents"
56-
#Start Migration#
57-
Start-SPMTMigration
58-
PS C:\Users\YourUserName> Get-SPMTMigration
59+
Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList $Global:TargetListName
60+
61+
#Start migration in the background#
62+
Start-SPMTMigration -NoShow
63+
64+
#Get the object of current migration#
65+
$session = Get-SPMTMigration
5966
```
60-
Start a migration first, and then run "Get-SPMTMigration" to get current tasks status and session level settings
67+
Start a migration first, and then run "Get-SPMTMigration" to get the object of current migration.
6168

6269
## PARAMETERS
6370

@@ -74,3 +81,4 @@ Start a migration first, and then run "Get-SPMTMigration" to get current tasks s
7481

7582
## RELATED LINKS
7683

84+

spmt/spmt-ps/spmt/Register-SPMTMigration.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
---
2-
external help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
2+
External help file: Microsoft.SharePoint.MigrationTool.PowerShell.dll-Help.xml
33
Module Name: Microsoft.SharePoint.MigrationTool.PowerShell
4-
applicable: SharePoint Migration Tool
5-
title: Register-SPMTMigration
6-
online version:
7-
schema: 2.0.0
4+
Applicable: SharePoint Migration Tool
5+
Title: Register-SPMTMigration
6+
Online version:
7+
Schema: 2.0.0
88
---
99

1010
# Register-SPMTMigration
1111

1212
## SYNOPSIS
13-
This cmdlet will create a SPMT migration session and initialization. The initialization includes configuring migration settings at session level and connecting to SPO. If no specific setting parameters are defined, default settings will be used.
14-
After a session is registered, the Administrator can add a migration task to the SPMT session and start migration.
13+
This cmdlet will create a migration session and initialize it. The initialization will configure migration settings at session level. If no specific setting parameters are defined, default settings will be used.
14+
After a session is registered, the user can add a migration task to the migration session and start migration.
1515
## SYNTAX
1616

1717
```
1818
Register-SPMTMigration [-Credentials <PSCredential>][-Incremental <bool>] [-ScanOnly <bool>][-MigrateFilesAndFoldersWithInvalidChars <bool>][-AzureActiveDirectoryLookup <bool>] [-CustomAzureAccessKey <string>] [-CustomAzureStorageAccount <bool>] [-DeleteTempFilesWhenMigrationDone <bool>] [-EnableEncryption <bool>] [-KeepAllVersions <bool>] [-MigrateFileVersionHistory <bool>] [-MigrateOneNoteFolderAsOneNoteNoteBook <bool>] [-MigrateFilesCreatedAfter <DateTime>] [-MigrateFilesModifiedAfter <DateTime>] [-SkipFilesWithExtensions <string>] [-MigrateHiddenFiles <bool>] [-NumberOfVersionToKeep <int>] [-PreserveUserPermissionsForFileShare <bool>] [-PreserveUserPermissionsForForSharePointSource <bool>][-SkipListWithAudienceTargetingEnabled <bool>] [-StartMigrationAutomaticallyWhenNoScanIssue <bool>] [-UseCustomAzureStorage <bool>] [-UserMappingFile <string>] [-WorkingFolder <string>] -Force
1919
```
2020

2121
## DESCRIPTION
22-
This cmdlet will create a SPMT migration session and initialization. The initialization includes configuring migration settings at session level and connecting to SPO. If no specific setting parameters are defined, default settings will be used.
23-
After a session is registered, the Administrator can add a migration task to the SPMT session and start migration.
22+
This cmdlet will create a migration session and initialize it. The initialization will configure migration settings at session level. If no specific setting parameters are defined, default settings will be used.
23+
After a session is registered, the user can add a migration task to the migration session and start migration.
2424

2525
## EXAMPLES
2626

27-
### Create a SPMT migration session and connecting to SPO.
27+
### Create a migration session and connecting to SPO.
2828
```
2929
#Define SPO target#
3030
$Global:SPOUrl = “https://contoso.sharepoint.com”
3131
$Global:UserName = “[email protected]
3232
$Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText -Force
3333
$Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
3434
35+
#Import SPMT Migration Module#
3536
Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
37+
3638
#Register the SPMT session with SPO credentials#
3739
Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
3840
```
3941

40-
Create a SPMT migration session and connecting to SPO
42+
Create a migration session.
4143

4244
## PARAMETERS
4345

@@ -162,7 +164,7 @@ Accept wildcard characters: False
162164
```
163165
164166
### -MigrateFileVersionHistory
165-
If set to No, only the most recent versions of the file will be migrated. If set to Yes, you can choose whether to keep all versions, or limit it to a specific number. By default, it is set to On.
167+
If set to Off, only the most recent versions of the file will be migrated. If set to On, you can choose whether to keep all versions, or limit it to a specific number. By default, it is set to On.
166168
167169
```yaml
168170
Type: Boolean
@@ -205,7 +207,7 @@ Accept wildcard characters: False
205207
```
206208
207209
### -MigrateFilesModifiedAfter
208-
If you choose to limit what files are to be migrated based on modified dates, set your values in this section. This may be to limit the number of files migrated or to adhere to overall company governance policy regarding to file retention. The default value is null.
210+
If you choose to limit what files are to be migrated based on modified dates, set your values in this section. This may be to limit the number of files migrated or to adhere to overall company governance policy regarding to file retention. The default value is null.
209211
```yaml
210212
Type: DateTime
211213
Parameter Sets:
@@ -421,4 +423,3 @@ Accept wildcard characters: False
421423
## NOTES
422424
423425
## RELATED LINKS
424-

0 commit comments

Comments
 (0)