I've used the Microsoft Azure PowerShell module to create an Azure storage account and blob container inside the storage account. I've set the blob container to be publicly accessible, but now I need to list the blobs from an anonymous connection.
I'm using the Windows Management Framework Core 5.0 November 2014 Preview with the Azure PowerShell module version 0.8.12.
Here is the code that I used to create the storage account, blob container, and upload a file to the container.
### Authenticate to Microsoft Azure platform
$Username = '[email protected]';
$AzureCredential = Get-Credential -Message 'Enter your Azure password.' -UserName $Username;
Add-AzureAccount -Credential $AzureCredential;
### Select the appropriate Azure subscription
$SubscriptionName = 'Visual Studio Ultimate with MSDN';
Select-AzureSubscription -SubscriptionName $SubscriptionName;
### Create Azure Storage Account
$StorageAccountName = 'opsgility';
New-AzureStorageAccount -StorageAccountName $StorageAccountName;
### Create Azure Storage Context
$StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName;
$Context = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary;
### Create a blob storage container with "container" level public access
$ContainerName = 'uploads';
New-AzureStorageContainer -Context $Context -Name $ContainerName -Permission Container;
### Upload a file to the blob container
Set-AzureStorageBlobContent -Context $Context -Container $ContainerName -File c:\windows\notepad.exe;
###
### How do I retrieve a list of Azure storage blobs from the container anonymously?
###