Skip to content

Instantly share code, notes, and snippets.

@SpeedmaxX
SpeedmaxX / testdrive.ps1
Created January 25, 2019 06:13
Copy O365 SiteCollection
$SourceWebUrl = "https://sourcesite"
$TargetWebUrl = "https://targetsite"
Set-PnPTraceLog -On -Level Debug
if ($SourceWebUrl.EndsWith("/")) {
$SourceWebUrl = $SourceWebUrl.Substring(0, $SourceWebUrl.Length - 1)
}
if ($TargetWebUrl.EndsWith("/")) {
$TargetWebUrl = $TargetWebUrl.Substring(0, $TargetWebUrl.Length - 1)
}