Move file to Azure blob storage using Powershell script in VS2008

Supriya Gupta 21 Reputation points
2020-11-19T03:33:12.837+00:00

HI
I have powershell script which is used to upload file in Azure blob storage. The powershell script on its own is working fine. But when i try to call the script using Execute Process task in VS2008, the package runs fine without any error but the file is not being moved. to Azure blob storage
The command being used in Execute Process Task Arguments is :

-File "C:\PSAzureSSIS\ExportFile.ps1"

When i run the package it opens chrome and asks me to select the account to sign-in and once i select the account the control shifts back to pacakge and completes successfuly but the file is not moved. Same happens when i execute the powershell on its own, but the file actually gets moved to Azure blob storage. What am i missing ?
Thanks

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,606 questions
{count} votes

Accepted answer
  1. deherman-MSFT 35,316 Reputation points Microsoft Employee
    2020-11-19T22:26:53.43+00:00

    @Supriya Gupta
    AzCopy is not part of PowerShell which is probably why it works when you run the script locally but not from VS. Since you are using PowerShell I recommend using Set-AzStorageBlobContent to upload the blob. You also might find this Stack Overflow thread helpful.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful