List Azure File Shared Storage using the REST API and Powershell
✓ Published0🌍 Public
HHugoberry
Last edited Sep 16, 2019
Created on Sep 16, 2019
This example demonstrates how to list Azure File Shared Storage contents using the REST API and PowerShell. It constructs a signed request by building a canonicalized signature string with the account key and HMAC-SHA256 encryption, then sends a GET request through `Invoke-RestMethod`. The code explicitly sets required headers such as `x-ms-date`, `x-ms-version`, and `Authorization`, and outputs the signature for inspection. The script uses PowerShell’s `System.Security.Cryptography.HMACSHA256` and `System.Uri` classes to compute authentication and parse the endpoint.
AI-generated description