Hello everyone,
I have been working on a domain migration that we have been doing from scratch. We needed to rebuild AD and after migrate those users documents. I'm using the below script to push their existing user documents to a new location. One issue I am running into is that the items aren't taking the permissions of the existing folder. I've checked through robocopy attributes to see if I could make the new files inherit the parent folders permissions but I am not having any success.
Anyone have any ideas on how to clear this up? And as always, thank you in advance for your help!
$csv = "\\server3\e$\Scripts\username2014.csv" $log = "\\server3\e$\Scripts\HomeDir_robocopy2014.log" Import-Csv $csv | % { $_.username } | % { $src = "\\server03\2014\$_" $dst = "\\server3\users$\Student\2014\$_\My Documents" robocopy "$src" "$dst" /e /copyall /r:1 /w:5 /np /log+:"$log" /tee }