Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Last active September 27, 2015 13:45
Show Gist options
  • Save gregjhogan/663b4e5be9e9f845ad50 to your computer and use it in GitHub Desktop.
Save gregjhogan/663b4e5be9e9f845ad50 to your computer and use it in GitHub Desktop.
Generate blob SAS URL
$cxn = (azure storage account connectionstring show --json --resource-group <resource-group> <storage-account>) | Out-String | ConvertFrom-Json
$sas = (azure storage blob sas create --json -c $cxn.string <container> <blob> r (Get-Date).AddHours(1).ToUniversalTime().ToString("s")) | Out-String | ConvertFrom-Json
$sas.url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment