A PowerShell script which provides the following:
- Mount remote/target server share with given username/password credentials.
- Copy all
$SourcePath
files to target share ($TargetServer
/$TargetShare
) recursively. - Finally, clean up all orphaned directories/files from target share.
./remotecopy.ps1 `
-SourcePath "." `