Azure blob download is incredibly slow using PowerShell (via Get-AzureStorageBlobContent), but fast via Azure Explorer,

Azure blob download is incredibly slow using PowerShell (via Get-AzureStorageBlobContent), but fast via Azure Explorer,

Content Index :

Azure blob download is incredibly slow using PowerShell (via Get-AzureStorageBlobContent), but fast via Azure Explorer,
Tag : powershell , By : Lord Zantor
Date : November 26 2020, 01:01 AM

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How to download a blob file from Azure Storage and save it to an FTP server using Powershell?

Tag : powershell , By : Roel van Dijk
Date : March 29 2020, 07:55 AM
With these it helps
I am trying to access a blob file in PowerShell and want to save it directly to an FTP server.
$url = "https://accountname.blob.core.windows.net/testcontainer/Test01.txt"
$separator = "://"
$option = [System.StringSplitOptions]::RemoveEmptyEntries
$temp = $url.Split($separator,4,$option)
$Protocol = $temp[0]
$HostName = $temp[1]
$Container = $temp[2]
$BlobName = $temp[3]

Azure PowerShell blob download - to confirm No always

Tag : powershell , By : Mariocki
Date : March 29 2020, 07:55 AM
wish help you to fix your issue The -Confirm switch is set to false by default so you omit it. You may see the confirmation dialog due to an existing file. You can bypass it by adding the -force switch.
$existingFiles = Get-childitem $officeFolder | Select-Object -ExpandProperty Name
ForEach ($blob in ($topBlobs | Where-Object Name -NotIn $existingFiles)) {

    Write-Output "Downloading $blob.Name..."

    Get-AzureStorageBlobContent -Blob $blob.Name `
      -Container $ContainerName `
      -Destination $officeFolder `
      -Context $ctx 

    Write-Output "Done."

Can you specify encoding type when uploading a file to Azure storage blob using Set-AzureStorageBlobContent or ConvertTo

Tag : json , By : Carter
Date : March 29 2020, 07:55 AM
may help you . I have a PowerShell script that downloads a JSON file stored in an Azure storage account blob. This file is in UTF-8 encoding. The script then reads from the JSON, makes the changes, creates a new JSON file with the same name, and uploads that back to the storage account using Set-AzureStorageBlobContent cmdlet. However, all the applications that were using that JSON file stopped working. After hours of troubleshooting, I noticed that when it uploads the new JSON back to the storage container (replacing the existing one), it uploads the JSON in a UTF-16 encoding. , Figured out the solution:
$JSONConvert = $jsonContent | ConvertTo-Json -Depth 4
$JSONEncode = [System.Text.UTF8Encoding]::new($false) 
[System.IO.File]::WriteAllLines('C:\P3\myFile.JSON',$JSONConvert ,$JSONEncode)

Set-AzureStorageBlobContent -Context $storageContext -Container "myContainer" -File "myFile.JSON" -Properties @{"ContentEncoding" = "UTF-8"} -Force

'Could not get the storage context' error when using Set-AzureStorageBlobContent in VSTS Azure Powershell task

Tag : azure , By : Epora75
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further While I probably should just delete this question (upon discovering the "answer"), I suppose I will provide what I found after more debugging, etc.
TLDR; -- This is mostly me not grepping the concept that an Azure Subscription (context) does not correlate to an Azure Storage (context).
$current = (Get-AzureSubscription -Current).SubscriptionName
Write-Host "current subscription is $current"

$setCurrent = $false
Write-Host "setCurrent is $setCurrent"
$setCurrent = Select-AzureSubscription -Current -SubscriptionName "CDN Subscription" -PassThru
if ($setCurrent)
  Write-Host "current set"
  $current = (Get-AzureSubscription -Current).SubscriptionName
  Write-Host "current subscription is $current"
  Write-Host "current not set"
$current = (Get-AzureSubscription -Current).SubscriptionName
Write-Host "current subscription is $current"

$table = Get-AzureStorageAccount | Format-Table -AutoSize -Property @{Label="Name";Expression={$_.StorageAccountName}},"Label","Location" | Out-String
Write-Host "$table"

Blob Code download much slower than MS Azure Storage Explorer

Tag : chash , By : Tetting
Date : March 29 2020, 07:55 AM
I wish this help you You should specify which version of MS Azure Storage explorer your're using.
If you're using some newer versions of 1.9.0 / 1.8.1 / 1.8.0 etc.(please find more details in this link), then Azure Storage Explorer is integrated with azcopy which is using simple commands designed for optimal performance. So you can have a good-performance for downloading / uploading etc.
Related Posts Related QUESTIONS :
  • ARM Template for Redis Cache failing to deploy
  • Copy folders that match names to other sub folder of matching directory
  • How to set parameters for SaveAs() dialog in Word.Application?
  • Attempting to Filter out All .p12 AND .pfx files from a given Directory
  • Powershell FTP Script String Concatenation
  • How to GET variables used in a specific BUILD in Azure Devops / TFS via api
  • Cleaning up DistributionGroup in PowerShell
  • PowerShell method Contains not working as expected
  • Feeding Get-ChildItem path info from an array - Illegal characters
  • Script argument as private scope variable
  • PowerShell Hashtable to JSON without Quotes
  • How to set as variable csv column using powershell?
  • Move flag from one script to another in PowerShell
  • Sort-Object problem (one MAC address and two IP addresses)
  • concatenate columnar output in PowerShell
  • When a list of objects is retruned from Get-EventLog that itself contains an array of strings, how do I access the array
  • Passing down a variable to function creates an array
  • Get-Date cannot convert null to type "System.Datetime"
  • I want run PowerShell commands using administrator with normal PowerShell user
  • How to using loop to find a file and remove it using PowerShell?
  • PowerShell Get-ChildItem on folder that does not exist behaves different with the -recurse flag
  • How to do looping for checking an existing folder with PowerShell?
  • Having trouble outputting to a CSV file. I know the output is a curly brackets "collection", but I'm stumped
  • How to replace last part of a string dynamically?
  • Checking to see if PowerShell Command worked, Crap Error
  • (Date).ToString does not use specified delimiter
  • Loop through multiple array in powershell
  • How to mapping a file by matching data using powershell?
  • How to define the return type / OutputType of a function
  • Use multiple CSVs out a folder individually and save their names
  • Get-FileHash command in powershell 2.0
  • How to pick a files based on the first received in PowerShell?
  • Is there a way to get a range for numbers larger than int32?
  • PowerShell and process exit codes
  • Parse a txt file or an input using PowerShell
  • Store different positional numbers on a variable
  • Windows Server 2012 R2 Remote Desktop access problems
  • Output filename weirdly
  • Filtering with wildcards
  • Internet Explorer object doesn't have Document child
  • Accept where clause in an advanced function
  • Howto get an INT output from select statement
  • After Stop-Process, task still shows on Get-Process
  • Get-ADUser using old pre-Windows 2000 Logon name instead of CN
  • Nonexistent LiteralPath Property of System.IO.FileInfo Object Bound to Parameter
  • How to Read the CSV file which has two data set (I.e Two Different Header and Column)
  • PS Script to print directory names if file type in it
  • Unable to delete files from the list using Remove-Item in PowerShell
  • Get results of For-Each arrays and display in a table with column headers one line per results
  • Running a powershell command using full path and arguments from command line
  • In Powershell, How do I get the Values out of an array returned by an object?
  • Checking if windows security patches are installed on multiple servers
  • how to set EnabledProtocols with IISAdministration module
  • Comparing LastWriteTime and CreationTime
  • Power Shell Script for loop?
  • Assigning licences in office 365 with powershell using csv
  • Powershell call -Command property with spaces
  • Azure Resource Manager template to create resources for different environments
  • How do I convert Localtime to epoch timestamp in powershell
  • How to replace $(data) in a string?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com