Access Blob storage using SAS Key via PowerShell

Alex Palmer 0 Reputation points
2024-09-03T09:55:03.15+00:00

Hi

I want to be able to access Blob storage using a SAS key in PowerShell. I have the SAS key set up on the storage account, limited to the IP of the server I'm running the PowerShell from. I want to be able to use the key without signing into Azure or using a Storage Account Key. Is this possible?

If I run
$SasToken = New-AzStorageContainerSASToken -Name "backup" -Permission "rad"

$Context = New-AzStorageContext -StorageAccountName "storage1" -SasToken $SasToken

I get
User's image

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,088 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,504 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.