Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in finding Powershell scripts that can be used\tweaked to migrate folder permissions across servers\environments.

Is this a feasible approach? I would like to automate our deployment process a little more.

Can someone point me to an example?


share|improve this question

closed as not constructive by Zoredache, Ward, HopelessN00b, Scott Pack, Mark Henderson Oct 8 '12 at 2:35

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Are you looking to copy the folders as well or just the permissions? – DKNUCKLES Oct 2 '12 at 15:43
Please don't cross-post. Ask your question in one place, if you discover it is the wrong place flag it for migration. – Zoredache Oct 2 '12 at 17:03
Server Fault is for answering actual questions, not collating a list of things. If you have a specific question about a script, then feel free to ask again. – Mark Henderson Oct 8 '12 at 2:35

I am not sure if you want to use PowerShell or if you need to use PowerShell.

If you dont need to, just use Robocopy.

This script would copy files;

robocopy.exe "\\SOURCESRV\ShareName" "\\DESTSRV\ShareName" /E /SEC /R:1

The /R:1 switch is not essential, just stops the program from hanging if it cannot read a file.

Maybe enable a log to monitor in case this happens? /Log:C:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.