Hi Guys,
I have a PowerShell script that gives me Azure Blobs metadata.
However, I don't think the script is working in an efficient way.
You see I have over a million files in azure storage and this script is iterating through all the files (millions of files) before giving me the specific metadata that I'm requesting based on my variable value
Is there a way to point my single object $_. to go straight to a specific path within the azure blob storage?
#Define Context Variable
$Ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
#List all blobs in a container.
$blobs = Get-AzureStorageBlob -Container $ContainerName -Context $Ctx
$FullPath = "PMS/OnQ/Hilton/OARevenueExtract/$BrandYear"
$blobs | Where-Object {$_.Name.Contains($FullPath)} | Select-Object Name,LastModified,Length | Format-Table -AutoSize
Thank you
Codernater