Skip to content

Instantly share code, notes, and snippets.

@RobsonAutomator
Created December 6, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobsonAutomator/f25c54ee1793224bdf1a054ba08c94a1 to your computer and use it in GitHub Desktop.
Save RobsonAutomator/f25c54ee1793224bdf1a054ba08c94a1 to your computer and use it in GitHub Desktop.
Copy items from source to destination
$destination = 'master:\sitecore\templates\'
$source = 'master:\sitecore\templates\'
$items = Get-ChildItem -Path $source
#use -WhatIf to check
Get-ChildItem -Path $destination | Remove-Item
foreach( $item in $items )
{
Copy-Item $item.ItemPath $destination
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment