Home Gitesh Portfolio Blog About Me Gallery Contact

Sitecore: Powershell query to copy items within Site tree

With this powershell command you will be able to copy any site tree items to another path.

 
$rootOfitemsToCopy = Get-Item "/sitecore/content/Test";
$destinationItemPath = Get-Item "/sitecore/content/Home";
 
Copy-Item -Path $rootOfitemsToCopy.Paths.FullPath -Destination $destinationItemPath.Paths.FullPath -Recurse
Posted: 24/06/2022 6:46:04 p.m. by Gitesh Shah | with 0 comments