Skip to content

Instantly share code, notes, and snippets.

@TravisEz13
Last active February 12, 2019 22:57
Show Gist options
  • Save TravisEz13/f75b8d8e2ae35c1f20de193bb6ea8e17 to your computer and use it in GitHub Desktop.
Save TravisEz13/f75b8d8e2ae35c1f20de193bb6ea8e17 to your computer and use it in GitHub Desktop.
param(
[uri] $sasUrl,
[string] $path,
[string] $container = 'signing-upload'
)
$filename = split-path -leaf $path
$newurl=[System.UriBuilder]::new($sasurl)
$newurl.path="/$container/$filename"
Invoke-WebRequest -Uri $newurl.Uri -Method Put -ContentType application/octet-stream -Headers @{
'x-ms-version'='2018-03-28'
'x-ms-blob-type' = 'BlockBlob'
} -InFile $path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment