Copy package from one server to another and execute batch scripts RRS feed

  • Question

  • Hi.

    I am trying to create a windows C# application, which can copy folder containing SSIS package files, xml configuration and batch scripts. Copy the folder from one remote desktop server to another ( Dev server to UAT server ) and execute the batch files without manual intervention. Is this possible using a custom windows deployable ?

    Can a Windows C# application move files and folders from one server to another and execute files in remote server? The windows application will be available in dev server and package execution to be happening in UAT server?

    Can this be achievable ? Any code samples available for this ?


    Friday, July 12, 2019 7:25 AM

All replies

  • Yes you could but I would ask the question if a simple PowerShell script wouldn't be easier. Everything needed to xcopy and install SSIS packages can be done via scripts. A Powershell script can be easily run on a remote machine if remoting is turned on. With the C# code you could use a UNC path but you'd need to have that set up on the remote server. Once you copy everything to the remote server you'd then have to remotely start the process.

    With Powershell you could copy the files to the remote machine (although you'd need to make sure you had sufficient privileges) and then run the script. Powershell can run scripts remotely.

    Michael Taylor

    Friday, July 12, 2019 1:52 PM
  • Hi .

    Thanks for the reply.

    Are there code samples in PowerShell, which can be used as a reference?

    Monday, July 15, 2019 5:35 AM
  • Hi Venkatzeus,

    For code samples in PowerShell, I suggest you ask in PoweShell forums for better help.

    Thank you for your understanding and support.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, July 15, 2019 9:00 AM
  • SSIS has a Powershell provider that can be used. Here's a link to an example of how to use it to deploy packages.

    If for some reason you cannot use the provider then you'll need to use Copy-Item. But you'll have to pay careful attention to security because not just anybody can do this. But you'll have these same issues with C# code. Refer to this on how to run PS remotely.

    Michael Taylor

    Monday, July 15, 2019 2:05 PM