How to run PowerShell from Azure Data Factory


I have PowerShell script which splits a complex CSV file to a smaller CSV file for every 1000 records. Here is the code:

Now I want to use this script in Azure PowerShell and I want to run this from Azure Data Factory. Can Someone please help with this.


I was able to run a PowerShell script by loading the script as an application in the Batch account associated to the Batch Custom Activity. From there it was figuring out the correct syntactical sugar to use the environment variables to get the path to my script and run it. I did this like so:

If you just want to call from the task dir, this should work:

Hope this helps someone else out there!


How to run PowerShell from Azure Data Factory by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply