Skip to content

Remove-StorageTable

Azure: Removes a storage table

param(
	[Parameter(Mandatory = $true)]
	[string]$Name,

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

try {
	Import-Module Az.Storage -ErrorAction Stop
	$ctx = (Get-AzStorageAccount -ResourceGroupName "*" -Name $StorageAccountName -ErrorAction Stop).Context
	Remove-AzStorageTable -Name $Name -Context $ctx -Force -ErrorAction Stop
	Write-Output "Successfully removed storage table '$Name'."
} catch {
	Write-Error $_
	exit 1
}

The name of the table to remove.

The name of the storage account.

An interactive directory of PowerShell scripts.