$ErrorActionPreference = "Stop"
Add-PSSnapin Microsoft.SharePoint.PowerShell
$SourcesiteCollectionUrl = read-host "Enter the source SiteCollection URL"
$TargetSiteCollectionUrl = read-host "Enter the target SiteCollection URL"
$dataFileName = read-host "Enter the data file name to create in C Drive"
$path = "C:\"+$dataFileName+".dat"
Export-SPWeb -identity $SourcesiteCollectionUrl -path $path
Import-SPWeb -identity $TargetSiteCollectionUrl -path $path
Add-PSSnapin Microsoft.SharePoint.PowerShell
$SourcesiteCollectionUrl = read-host "Enter the source SiteCollection URL"
$TargetSiteCollectionUrl = read-host "Enter the target SiteCollection URL"
$dataFileName = read-host "Enter the data file name to create in C Drive"
$path = "C:\"+$dataFileName+".dat"
Export-SPWeb -identity $SourcesiteCollectionUrl -path $path
Import-SPWeb -identity $TargetSiteCollectionUrl -path $path
No comments:
Post a Comment