Skip to content

Commit f547945

Browse files
committed
tweak
1 parent f3f24f0 commit f547945

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

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

Lines changed: 16 additions & 18 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
88
ms.date: 06/23/2022
9-
ms.author: rogarana
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
@@ -43,19 +43,21 @@ Install-Module AzTable
4343

4444
## Authorizing table data operations
4545

46-
The AzTable PowerShell module supports authorization with the account key via Shared Key authorization. For examples that show how to use Shared Key authorization for data access with the AzTable module, see [Use Shared Key authorization with the AzTable module](#use-shared-key-authorization-with-the-aztable-module).
46+
The AzTable PowerShell module supports authorization with the account access key via Shared Key authorization. For examples that show how to use Shared Key authorization for data access with the AzTable module, see [Use Shared Key authorization with the AzTable module](#use-shared-key-authorization-with-the-aztable-module).
4747

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.
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.
4949

50-
## Use Shared Key authorization with the AzTable module
50+
The examples in this article show how to authorize table data operations via Shared Key.
51+
52+
## Sign in to Azure
5153

5254
To get started, sign in to your Azure subscription with the `Add-AzAccount` command and follow the on-screen directions.
5355

5456
```powershell
5557
Add-AzAccount
5658
```
5759

58-
### Retrieve list of locations
60+
## Retrieve list of locations
5961

6062
If you don't know which location you want to use, you can list the available locations. After the list is displayed, find the one you want to use. These examples use **eastus**. Store this value in the variable **location** for future use.
6163

@@ -64,7 +66,7 @@ Get-AzLocation | select Location
6466
$location = "eastus"
6567
```
6668

67-
### Create resource group
69+
## Create resource group
6870

6971
Create a resource group with the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command.
7072

@@ -75,7 +77,7 @@ $resourceGroup = "pshtablesrg"
7577
New-AzResourceGroup -ResourceGroupName $resourceGroup -Location $location
7678
```
7779

78-
### Create storage account
80+
## Create storage account
7981

8082
Create a standard general-purpose storage account with locally redundant storage (LRS) using [New-AzStorageAccount](/powershell/module/az.storage/New-azStorageAccount). Be sure to specify a unique storage account name. Next, get the context that represents the storage account. When acting on a storage account, you can reference the context instead of repeatedly providing your credentials.
8183

@@ -90,7 +92,7 @@ $storageAccount = New-AzStorageAccount -ResourceGroupName $resourceGroup `
9092
$ctx = $storageAccount.Context
9193
```
9294

93-
### Create a new table
95+
## Create a new table
9496

9597
To create a table, use the [New-AzStorageTable](/powershell/module/az.storage/New-AzStorageTable) cmdlet. In this example, the table is called `pshtesttable`.
9698

@@ -99,23 +101,23 @@ $tableName = "pshtesttable"
99101
New-AzStorageTable –Name $tableName –Context $ctx
100102
```
101103

102-
### Retrieve a list of tables in the storage account
104+
## Retrieve a list of tables in the storage account
103105

104106
Retrieve a list of tables in the storage account using [Get-AzStorageTable](/powershell/module/az.storage/Get-AzStorageTable).
105107

106108
```powershell
107109
Get-AzStorageTable –Context $ctx | select Name
108110
```
109111

110-
### Retrieve a reference to a specific table
112+
## Retrieve a reference to a specific table
111113

112114
To perform operations on a table, you need a reference to the specific table. Get a reference using [Get-AzStorageTable](/powershell/module/az.storage/Get-AzStorageTable).
113115

114116
```powershell
115117
$storageTable = Get-AzStorageTable –Name $tableName –Context $ctx
116118
```
117119

118-
### Reference the CloudTable property of a specific table
120+
## Reference the CloudTable property of a specific table
119121

120122
> [!IMPORTANT]
121123
> 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.
@@ -128,7 +130,7 @@ $cloudTable = $storageTable.CloudTable
128130

129131
[!INCLUDE [storage-table-entities-powershell-include](../../../includes/storage-table-entities-powershell-include.md)]
130132

131-
### Delete a table
133+
## Delete a table
132134

133135
To delete a table, use [Remove-AzStorageTable](/powershell/module/az.storage/Remove-AzStorageTable). This cmdlet removes the table, including all of its data.
134136

@@ -139,10 +141,6 @@ Remove-AzStorageTable –Name $tableName –Context $ctx
139141
Get-AzStorageTable –Context $Ctx | select Name
140142
```
141143

142-
## Azure AD
143-
144-
145-
146144
## Clean up resources
147145

148146
If you created a new resource group and storage account at the beginning of this how-to, you can remove all of the assets you have created in this exercise by removing the resource group. This command deletes all resources contained within the group as well as the resource group itself.

0 commit comments

Comments
 (0)