locked
Power Shell Script to move data from Server A to Another server B RRS feed

  • Question

  • Hi All,

    Have a requirement to move the files from server which is located at US-(HQ) to DR site which is located in London.

    link connectivity is available for both the sites.

    could any provide a detailed POWER-SHELL script and Scheduler to move the latest files from HQ server  to DR server. with detailed log activity.

    thanks

    Wednesday, May 13, 2015 11:13 AM

Answers

  • Use DFS with one way replication. It shouldn't be necessary to use a script but if you choose to go down that route then robocopy is your friend.
    • Proposed as answer by Mike Laughlin Wednesday, May 13, 2015 12:15 PM
    • Marked as answer by Bill_Stewart Tuesday, June 2, 2015 3:55 PM
    Wednesday, May 13, 2015 11:18 AM

All replies

  • Use DFS with one way replication. It shouldn't be necessary to use a script but if you choose to go down that route then robocopy is your friend.
    • Proposed as answer by Mike Laughlin Wednesday, May 13, 2015 12:15 PM
    • Marked as answer by Bill_Stewart Tuesday, June 2, 2015 3:55 PM
    Wednesday, May 13, 2015 11:18 AM
  • have used the below power-shell robycopy to move files.

    my requirements are

    1) move the latest .log only ( do not move the log files which are already moved)

    2) steps to task scheduler the script in windows server 2008 R2

    3) Daily generate a detailed report for all the scheduler

    Set-ExecutionPolicy Unrestricted
    robocopy \\1.2.3.4\c$\Test1 \\1.2.5.6\D$\Test2 /MOV > c:\Data.txt

    thanks..

    Wednesday, May 13, 2015 11:51 AM
  • Sorry, but this forum is not a free script-writing service. Keep in mind that the people answering posts here are busy professionals, most with full-time jobs, who volunteer to help others for free. If you require someone to write a script for you to accomplish some task, it is customary to pay for the service.

    -- Bill Stewart [Bill_Stewart]

    Wednesday, May 13, 2015 2:11 PM