@@ -10,50 +10,129 @@ schema: 2.0.0
10
10
# Add-SPMTTask
11
11
12
12
## SYNOPSIS
13
- {{Fill in the Synopsis}}
14
-
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.
15
14
## SYNTAX
16
15
17
- ### FileShare (Default)
16
+ ### FileShare
18
17
```
19
18
Add-SPMTTask -FileShareSource <String> -TargetSiteUrl <String> -TargetList <String>
20
19
[-TargetListRelativePath <String>]
21
20
```
22
-
23
21
### SharePointMigrateAll
24
- ```
25
- Add-SPMTTask [-MigrateAll] -SharePointSourceSiteUrl <String> -SharePointSourceCredential <PSCredential>
26
- -TargetSiteUrl <String>
22
+ ```
23
+ Add-SPMTTask -SharePointSourceCredential <PSCredential> -SharePointSourceSiteUrl <string> -TargetSiteUrl <string> -MigrateAll
27
24
```
28
25
29
26
### SharePointMigrateSelected
30
27
```
31
- Add-SPMTTask -SharePointSourceSiteUrl <String> -SharePointSourceCredential <PSCredential>
32
- [-SourceListRelativePath <String>] -SourceList <String> -TargetSiteUrl <String> -TargetList <String>
33
- [-TargetListRelativePath <String>]
28
+ Add-SPMTTask -SharePointSourceSiteUrl <string> -SharePointSourceCredential <pscredential> -SourceList <string> [-SourceListRelativePath <string>] -TargetSiteUrl <string> -TargetList <string> [-TargetListRelativePath <string>]
34
29
```
35
30
36
31
### Json
37
32
```
38
- Add-SPMTTask [-SharePointSourceCredential <PSCredential>] -JsonDefinition <String>
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.
37
+ {
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
+ {
46
+ "SourcePath":"http://YourOnPremSite",
47
+ "TargetPath":"https://YourTargetSite",
48
+ "Items":{
49
+ "Lists":[
50
+ {
51
+ "SourceList":"sourceListName",
52
+ "TargetList":"targetListName"
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ Json defined migration task sample 3:
58
+ Customer scenario:migrate on-prem sites with subsites to SPO.
59
+ {
60
+ "SourcePath":"http://YourOnPremSite",
61
+ "TargetPath":"https://YourTargetSite",
62
+ "Items":{
63
+ "Lists":[
64
+ {
65
+ "SourceList":"listVersion2",
66
+ "TargetList":"ListVersion2"
67
+ },
68
+ {
69
+ "SourceList":"listVersion3",
70
+ "TargetList":"ListVersion3"
71
+ }
72
+ ],
73
+ "SubSites":[
74
+ {
75
+ "SourceSubSitePath":"subSite",
76
+ "TargetSubSitePath":"targetSubSite",
77
+ "Lists":[
78
+ {
79
+ "SourceList":"testSubListB",
80
+ "TargetList":"targetSubList"
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ }
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
+ }
39
93
```
40
94
41
95
## DESCRIPTION
42
- {{Fill in the Description}}
96
+ 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.
43
98
44
99
## EXAMPLES
45
100
46
101
### Example 1
47
102
```
48
- PS C:\> {{ Add example code here }}
103
+ #Define On-prem SharePoint 2013 data source#
104
+
105
+ $Global:SourceSiteUrl = "http://YourOnPremSite/"
106
+ $Global:OnPremUserName = "Yourcomputer\administrator"
107
+ $Global:OnPremPassword = ConvertTo-SecureString -String "OnPremPassword" -AsPlainText -Force
108
+ $Global:SPCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:OnPremUserName, $Global:OnPremPassword
109
+ $Global:SourceListName = "SourceListName"
110
+
111
+
112
+ #Define SPO target#
113
+ $Global:SPOUrl = “https://contoso.sharepoint.com”
114
+ $Global:UserName = “[email protected] ”
115
+ $Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText -Force
116
+ $Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
117
+ $Global:TargetListName = "TargetListName"
118
+
119
+ #Define Fileshare data source#
120
+ $Global:FileshareSource = "YourFileShareDataSource"
121
+ #Import SPMT Migration Module#
122
+ Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
123
+ #Register the SPMT session with SPO credentials#
124
+ Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
125
+ #Add two tasks into the session. One on-prem and one file share task.#
126
+ Add-SPMTTask -SharePointSourceCredential $Global:SPCredential -SharePointSourceSiteUrl $Global:SourceSiteUrl -TargetSiteUrl $Global:SPOUrl -MigrateAll
127
+ Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList "Documents"
49
128
```
50
129
51
- {{ Add example description here }}
130
+ Add one file share migration task and one on-prem 2013 migration task to registered migration session.
52
131
53
132
## PARAMETERS
54
133
55
134
### -FileShareSource
56
- {{Fill FileShareSource Description}}
135
+ This parameter is mandatory for file share migration. Please specify the source folder path. For example: C:\SourceFiles.
57
136
58
137
``` yaml
59
138
Type : String
@@ -68,7 +147,7 @@ Accept wildcard characters: False
68
147
` ` `
69
148
70
149
### -JsonDefinition
71
- {{Fill JsonDefinition Description}}
150
+ Define one File share task or SharePoint task in JSON format.
72
151
73
152
` ` ` yaml
74
153
Type : String
@@ -83,7 +162,7 @@ Accept wildcard characters: False
83
162
` ` `
84
163
85
164
### -MigrateAll
86
- {{Fill MigrateAll Description}}
165
+ This is a switch parameter. If set to True, all lists will be migrated. If set to False, the customer will migrate selected lists.
87
166
88
167
` ` ` yaml
89
168
Type : SwitchParameter
@@ -98,7 +177,7 @@ Accept wildcard characters: False
98
177
` ` `
99
178
100
179
### -SharePointSourceCredential
101
- {{Fill SharePointSourceCredential Description}}
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.
102
181
103
182
` ` ` yaml
104
183
Type : PSCredential
@@ -125,7 +204,7 @@ Accept wildcard characters: False
125
204
` ` `
126
205
127
206
### -SharePointSourceSiteUrl
128
- {{Fill SharePointSourceSiteUrl Description}}
207
+ Use this parameter to define SharePoint data source site URL.
129
208
130
209
` ` ` yaml
131
210
Type : String
@@ -140,7 +219,7 @@ Accept wildcard characters: False
140
219
` ` `
141
220
142
221
### -SourceList
143
- {{Fill SourceList Description}}
222
+ This parameter is mandatory and defines source document library name or list name.
144
223
145
224
` ` ` yaml
146
225
Type : String
@@ -155,7 +234,7 @@ Accept wildcard characters: False
155
234
` ` `
156
235
157
236
### -SourceListRelativePath
158
- {{Fill SourceListRelativePath Description}}
237
+ This parameter is optional and is to define one or more migration data source relative paths.
159
238
160
239
` ` ` yaml
161
240
Type : String
@@ -170,7 +249,7 @@ Accept wildcard characters: False
170
249
` ` `
171
250
172
251
### -TargetList
173
- {{Fill TargetList Description}}
252
+ This parameter is mandatory and defines target library name or list name.
174
253
175
254
` ` ` yaml
176
255
Type : String
@@ -185,7 +264,7 @@ Accept wildcard characters: False
185
264
` ` `
186
265
187
266
### -TargetListRelativePath
188
- {{Fill TargetListRelativePath Description}}
267
+ This parameter is optional. You can define one or more target relative paths in a list and make the value to this parameter.
189
268
190
269
` ` ` yaml
191
270
Type : String
@@ -200,7 +279,7 @@ Accept wildcard characters: False
200
279
` ` `
201
280
202
281
### -TargetSiteUrl
203
- {{Fill TargetSiteUrl Description}}
282
+ This parameter is mandatory for both file share and on-prem migration and defines the target site URL.
204
283
205
284
` ` ` yaml
206
285
Type : String
0 commit comments