Skip to content

Commit 1b37897

Browse files
authored
Merge pull request #202737 from tamram/tamram22-0623a
AzTable module doesn't natively support OAuth
2 parents 95959fb + 921e6e6 commit 1b37897

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

articles/storage/common/storage-account-recover.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,4 @@ To restore a deleted storage account from within another storage account, follow
7171

7272
- [Storage account overview](storage-account-overview.md)
7373
- [Create a storage account](storage-account-create.md)
74-
- [Upgrade to a general-purpose v2 storage account](storage-account-upgrade.md)
7574
- [Move an Azure Storage account to another region](storage-account-move.md)

articles/storage/tables/table-storage-how-to-use-powershell.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Perform Azure Table storage operations with PowerShell | Microsoft Docs
33
description: Learn how to run common tasks such as creating, querying, deleting data from Azure Table storage account by using PowerShell.
4-
author: roygara
4+
author: tamram
55

66
ms.service: storage
77
ms.topic: article
8-
ms.date: 04/05/2019
9-
ms.author: rogarana
8+
ms.date: 06/23/2022
9+
ms.author: tamram
1010
ms.subservice: tables
1111
ms.custom: devx-track-azurepowershell
1212
---
@@ -16,7 +16,7 @@ ms.custom: devx-track-azurepowershell
1616

1717
Azure Table storage is a NoSQL datastore that you can use to store and query huge sets of structured, non-relational data. The main components of the service are tables, entities, and properties. A table is a collection of entities. An entity is a set of properties. Each entity can have up to 252 properties, which are all name-value pairs. This article assumes that you are already familiar with the Azure Table Storage Service concepts. For detailed information, see [Understanding the Table Service Data Model](/rest/api/storageservices/Understanding-the-Table-Service-Data-Model) and [Get started with Azure Table storage using .NET](../../cosmos-db/tutorial-develop-table-dotnet.md).
1818

19-
This how-to article covers common Azure Table storage operations. You learn how to:
19+
This how-to article covers common Azure Table storage operations. You learn how to:
2020

2121
> [!div class="checklist"]
2222
> * Create a table
@@ -26,26 +26,30 @@ This how-to article covers common Azure Table storage operations. You learn how
2626
> * Delete table entities
2727
> * Delete a table
2828
29-
This how-to article shows you how to create a new Azure Storage account in a new resource group so you can easily remove it when you're done. If you'd rather use an existing Storage account, you can do that instead.
29+
This how-to article shows you how to create a new storage account in a new resource group so you can easily remove it when you're done. You can also use an existing storage account.
3030

3131
The examples require Az PowerShell modules `Az.Storage (1.1.0 or greater)` and `Az.Resources (1.2.0 or greater)`. In a PowerShell window, run `Get-Module -ListAvailable Az*` to find the version. If nothing is displayed, or you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-az-ps).
3232

3333
> [!IMPORTANT]
34-
> Using this Azure feature from PowerShell requires that you have the `Az` module installed. The current version of `AzTable` is not compatible with the older AzureRM module.
35-
> Follow the [latest install instructions for installing Az module](/powershell/azure/install-az-ps) if needed.
34+
> Using this Azure feature from PowerShell requires that you have the `Az` module installed. The current version of `AzTable` is not compatible with the older AzureRM module. Follow the [latest install instructions for installing Az module](/powershell/azure/install-az-ps) if needed.
35+
>
36+
> For module name compatibility reasons, this module is also published under the previous name `AzureRmStorageTables` in PowerShell Gallery. This document will reference the new name only.
3637
3738
After Azure PowerShell is installed or updated, you must install module **AzTable**, which has the commands for managing the entities. To install this module, run PowerShell as an administrator and use the **Install-Module** command.
3839

39-
> [!IMPORTANT]
40-
> For module name compatibility reasons we are still publishing this same module under the old name `AzureRmStorageTables` in PowerShell Gallery. This document will reference the new name only.
41-
4240
```powershell
4341
Install-Module AzTable
4442
```
4543

44+
## Authorizing table data operations
45+
46+
The AzTable PowerShell module supports authorization with the account access key via Shared Key authorization. The examples in this article show how to authorize table data operations via Shared Key.
47+
48+
Azure Table Storage supports authorization with Azure AD. However, the AzTable PowerShell module does not natively support authorization with Azure AD. Using Azure AD with the AzTable module requires that you call methods in the .NET client library from PowerShell.
49+
4650
## Sign in to Azure
4751

48-
Sign in to your Azure subscription with the `Add-AzAccount` command and follow the on-screen directions.
52+
To get started, sign in to your Azure subscription with the `Add-AzAccount` command and follow the on-screen directions.
4953

5054
```powershell
5155
Add-AzAccount
@@ -62,7 +66,7 @@ $location = "eastus"
6266

6367
## Create resource group
6468

65-
Create a resource group with the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command.
69+
Create a resource group with the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command.
6670

6771
An Azure resource group is a logical container into which Azure resources are deployed and managed. Store the resource group name in a variable for future use. In this example, a resource group named *pshtablesrg* is created in the *eastus* region.
6872

@@ -111,15 +115,15 @@ To perform operations on a table, you need a reference to the specific table. Ge
111115
$storageTable = Get-AzStorageTable –Name $tableName –Context $ctx
112116
```
113117

114-
## Reference CloudTable property of a specific table
118+
## Reference the CloudTable property of a specific table
115119

116120
> [!IMPORTANT]
117-
> Usage of CloudTable is mandatory when working with **AzTable** PowerShell module. Call the **Get-AzStorageTable** command to get the reference to this object. This command also creates the table if it does not already exist.
121+
> Using the **CloudTable** property is mandatory when working with table data via the **AzTable** PowerShell module. Call the **Get-AzStorageTable** command to get the reference to this object. This command also creates the table if it does not already exist.
118122
119-
To perform operations on a table using **AzTable**, you need a reference to CloudTable property of a specific table.
123+
To perform operations on a table using **AzTable**, return a reference to the **CloudTable** property of a specific table. The **CloudTable** property exposes the .NET methods available for managing table data from PowerShell.
120124

121125
```powershell
122-
$cloudTable = (Get-AzStorageTable –Name $tableName –Context $ctx).CloudTable
126+
$cloudTable = $storageTable.CloudTable
123127
```
124128

125129
[!INCLUDE [storage-table-entities-powershell-include](../../../includes/storage-table-entities-powershell-include.md)]
@@ -145,7 +149,7 @@ Remove-AzResourceGroup -Name $resourceGroup
145149

146150
## Next steps
147151

148-
In this how-to article, you learned about common Azure Table storage operations with PowerShell, including how to:
152+
In this how-to article, you learned about common Azure Table storage operations with PowerShell, including how to:
149153

150154
> [!div class="checklist"]
151155
> * Create a table

includes/storage-table-entities-powershell-include.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: tamram
33
ms.service: storage
44
ms.topic: include
5-
ms.date: 03/27/2019
5+
ms.date: 06/23/2022
66
ms.author: tamram
77
---
88
<!--created by Robin Shahan to go in the articles for table storage w/powershell.
@@ -71,7 +71,7 @@ This command yields results similar to the following table:
7171
| 2 | Jessie | partition2 | NM |
7272
| 4 | Steven | partition2 | TX |
7373

74-
#### Retrieve entities for a specific partition
74+
#### Retrieve entities for a specific partition key
7575

7676
```powershell
7777
Get-AzTableRow -table $cloudTable -partitionKey $partitionKey1 | ft

0 commit comments

Comments
 (0)