Skip to content

Get-StorageShareSummary

Azure: Gets a summary of storage shares

param(
	[Parameter(Mandatory = $true)]
	[string]$StorageAccountName
)

try {
	Import-Module Az.Storage -ErrorAction Stop
	$ctx = (Get-AzStorageAccount -ResourceGroupName "*" -Name $StorageAccountName -ErrorAction Stop).Context
	$shares = Get-AzStorageShare -Context $ctx -ErrorAction Stop | Select-Object Name, Quota, LastModified
	Write-Output $shares
} catch {
	Write-Error $_
	exit 1
}

The name of the storage account.

An interactive directory of PowerShell scripts.