Skip to content

New-StorageTable

Azure: Creates 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
	$table = New-AzStorageTable -Name $Name -Context $ctx -ErrorAction Stop
	Write-Output $table
} catch {
	Write-Error $_
	exit 1
}

The name for the new table.

The name of the storage account.

An interactive directory of PowerShell scripts.