In the previous posts I have described Azure Queue and provided small usage examples. In this post I am going to show how Azure Table service can be managed from Powershell. Azure Table service is a service that stores structured NoSQL data in the cloud. It is a key/attribute store with no schema. Also, it is worth to mention that it costs much less that SQL Database for similar volumes of data. You can use the Table service to store and query huge sets of structured, non-relational data, and your tables will scale as demand increases. There is a good post Working with 154 million records on Azure Table Storage – the story of “Have I been pwned?” about Azure Table service that everyone should read.
Refer to previous posts to get started with Azure Storage Services.
Create a new azure table first, use New-AzureStorageTable cmdlet:
PS C:\WINDOWS\system32> New-AzureStorageTable table1 CloudTable Uri Context ---------- --- ------- table1 https://default748347.table.core.windows.net/table1 Microsoft.WindowsAzure.Commands.Common.Storage.AzureS...
To get the list of all azure tables in the current storage account use Get-AzureStorageTable
PS C:\WINDOWS\system32> Get-AzureStorageTable CloudTable Uri Context ---------- --- ------- table1 https://default748347.table.core.windows.net/table1 Microsoft.WindowsAzure.Commands.Common.Storage.AzureS...
To remove the azure table use Remove-AzuerStorageTable:
PS C:\WINDOWS\system32> Remove-AzureStorageTable table1
To check that table has been actually removed use Get-AzureStorageTable:
PS C:\WINDOWS\system32> Get-AzureStorageTable
it will return nothing.
In this post I showed a few basic Azure Table PowerShell commands, it is what will cover 80% of your needs. There are a few other cmdlets for managing SAS tokens and stored access policies. In the next post I am going to describe how Azure Table can be used from code.