Uploading and downloading files from Azure to Windows using PowerShell -
i writing powershell script communicate microsoft azure account, , facing issue uploading , downloading files using set-azurestorageblobcontent , get-azurestorageblobcontent modules.
$upload = @{ context = $storagecontext; container = $container; file = "c:\... \file.csv"; } set-azurestorageblobcontent @upload -force; the first time run this, appears start uploading, stays @ 0% , never rises. if cancel , try executing script again, error says: "set-azurestorageblobcontent : transfer operation same source , destination exists." identical thing happens when try download existing blob azure.
$params = @{ context = $storagecontext; container = $container; blob = $blob; destination = $dest } new-item -path $dest -itemtype directory -force get-azurestorageblobcontent @params i have tried reinstalling azure.storage, module contains cmdlet get-azurestorageblobcontent , set-azurestorageblobcontent, had no luck. doing incorrectly, or code wrong somehow?
it seems $upload variable. try instead:
get-childitem –path c:\images\* | set-azurestorageblobcontent -container "yourcontainername" more info: https://docs.microsoft.com/en-us/azure/storage/storage-powershell-guide-full
Comments
Post a Comment