@@ -25,7 +25,7 @@ Remove the SPMT migration session created.
25
25
26
26
### Example 1
27
27
```
28
- #Define On-prem SharePoint 2013 data source#
28
+ #Define SharePoint 2013 data source#
29
29
30
30
$Global:SourceSiteUrl = "http://YourOnPremSite/"
31
31
$Global:OnPremUserName = "Yourcomputer\administrator"
@@ -41,18 +41,23 @@ $Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText
41
41
$Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
42
42
$Global:TargetListName = "TargetListName"
43
43
44
- #Define Fileshare data source#
44
+ #Define File Share data source#
45
45
$Global:FileshareSource = "YourFileShareDataSource"
46
+
46
47
#Import SPMT Migration Module#
47
48
Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
49
+
48
50
#Register the SPMT session with SPO credentials#
49
51
Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
50
- #Add two tasks into the session. One on-prem and one file share task.#
52
+
53
+ #Add two tasks into the session. One is SharePoint migration task, and another is File Share migration task.#
51
54
Add-SPMTTask -SharePointSourceCredential $Global:SPCredential -SharePointSourceSiteUrl $Global:SourceSiteUrl -TargetSiteUrl $Global:SPOUrl -MigrateAll
52
- Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList "Documents"
53
- #Start Migration in the background#
54
- Start-SPMTMigration -NoShow
55
+ Add-SPMTTask -FileShareSource $Global:FileshareSource -TargetSiteUrl $Global:SPOUrl -TargetList $Global:TargetListName
56
+
57
+ #Start Migration in the background.#
58
+ Start-SPMTMigration -NoShow
55
59
60
+ #Cancel the started migration and unregister the migration session.#
56
61
Stop-SPMTMigration
57
62
Unregister-SPMTMigration
58
63
```
0 commit comments