Copy-Item / Remove-Item child-content only without root folder?
Take a look at the get-childitem command. You can use this in the pipeline to copy or remove all items underneath the root folders:
# recursively copy everything under C:\Temp\Test1 to C:\Temp\Test2
get-childitem "C:\Temp\Test1" | % {
copy-item $_.FullName -destination "C:\Temp\Test2\$_" -recurse
}
# recursively remove everything under C:\Temp\Test1
get-childitem "C:\Temp\Test1" -recurse | % {
remove-item $_.FullName -recurse
}
Copy-Item C:\Temp\Test1\* C:\Temp\Test2
Remove-Item "C:\Temp\Test2\*" -recurse
Works too :)