Powershell Script to Copy Folder and Content to remote location

Question:

I have written a power-shell script that copy the files from one location to another locally on server. I am trying to assemble the files at one server location and while doing this getting permission error. Script below:-

Answer:

I removed the invoke command and after changing the logic script work as expected.

Source:

Powershell Script to Copy Folder and Content to remote location by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply