0
votes

I am a beginner at azure-CLI.

I just wanted to find out the storage account id.

I have a resource group named 'group2' and a storage account with the name 'storageacc1'.

I tried the below PowerShell command to get storage account details :

Get-AzStorageAccount -ResourceGroupName "group2" -AccountName "storageacc11"

In the return I got StorageAccountName,ResourceGroupName,PrimaryLocation, SkuName,Kind, AccessTier,CreationTime,ProvisioningState,EnableHttpsTrafficOnly,LargeFileShares.

how to get a storage account id?

1

1 Answers

1
votes

Just use the code blow:

$s = Get-AzStorageAccount -ResourceGroupName "xx" -AccountName "xx"

$s.Id