Import-Module Microsoft.WindowsAzure.StorageClient.dll $storageAccountName = 'my storage account' $accessKey = 'my access key' $storageCredentials = New-Object Microsoft.WindowsAzure.StorageCredentialsAccountAndKey($storageAccountName, $accessKey) $storageAccountEndpoint = "http://$storageAccountName.blob.core.windows.net/" $blobClient = New-Object Microsoft.WindowsAzure.StorageClient.CloudBlobClient($storageAccountEndpoint, $storageCredentials) $filename = "my file" $blob = $blobClient.GetBlobReference($filename) $localFilename = "local filename" $blob.DownloadToFile($localFilename)
References:
CloudBlob.DownloadToFile
Microsoft.WindowsAzure.StorageClient
Edit 2013-04-05
This is based on the 1.0 Storage Client. Updated script can be found in an updated post on Windows Azure Storage through Powershell
No comments:
Post a Comment