1

I am brand new to using PowerShell and all I want to do is create a .ps1 file that I can execute which then executes a python script from blob storage in my Azure storage account.

I think the normal execution command would simply be:

C:/test.py

or maybe set the path then:

python test.py

???

But how do I do this to execute a script stored in a blob at say:

https://StorageName.blob.core.windows.net/testing/testblob/test.py

?

And can I just save that command as a .ps1 which will kickoff the Python script when I execute the .ps1?

Thanks!

1 Answer 1

2

You'd first need to download your python script from your blob to local storage (whether local = VM, web/worker role instance, website instance, your laptop...). Then, once it's downloaded, you can run it.

And since you're using PowerShell: If you install the Azure PowerShell cmdlets, you can download the file from blob, using Get-AzureStorageBlobContent:

Get-AzureStorageBlobContent -Container containername -Blob blobname -Destination localFolder

More info on Get-AzureStorageBlobContent is here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.