Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Copy owners with robocopy using powershell.

$
0
0
Hi Friends..

I have created script to copy folder from one location to another location in PS. using Robocopy..


but By this script cannot copy the owner of the source location folder to destination.. 

below is the script..

please help me to add some points to update this script with copy owners of the folders as well..

Import-Csv "D:\script\file.csv" | ForEach-Object {
                $Source = $_.Sourceserver
                $Target = $_.Destinantionserver
                robocopy.exe $Source $Target /b /e /copyall
}

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>