Get-AzStorageQueue

In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzStorageQueue PowerShell command with examples of how to use the Get-AzStorageQueue command.

Get-AzStorageQueue

The Get-AzStorageQueue PowerShell command is a very good PowerShell command that can help you to get the lists of storage queues that are associated with the specified storage account.

Syntax

Below is the syntax of the Get-AzStorageQueue PowerShell command.

Get-AzStorageQueue
 [[-Name] <String>]

Let’s discuss a few examples of the usage of the Get-AzStorageQueue command.

Example-1:

You can execute the below PowerShell command to get the lists of storage queues from the demorg18c6c storage account.

$sARG = "DEMORG1"
$sAName = "demorg18c6c"
$sAKey = (Get-AzStorageAccountKey -ResourceGroupName $sARG -AccountName $sAName).Value[0]
$myctx = New-AzStorageContext -StorageAccountName $sAName -StorageAccountKey $sAKey
Get-AzStorageQueue -Context $myctx

After executing the above script, I got the below output


   Queue End Point: https://demorg18c6c.queue.core.windows.net/

Name                             Uri                                                  
----                             ---                                                  
flowec38d66ac5f03a7jobtriggers00 https://demorg18c6c.queue.core.windows.net/flowec3...

You can see the same output below

Get-AzStorageQueue

Note: An important point to note down here is, you need to pass the storage context like above along with the Get-AzStorageQueue command else you will get the error “Get-AzStorageQueue : Could not get the storage context. Please pass in a storage
context or set the current storage context.”.

You may also like following the below articles

Conclusion

In this Azure PowerShell article, we discussed the syntax and usage of the Get-AzStorageQueue PowerShell command. Thanks for your valuable time to read this article !!!