Skip to content

Commit eb154c5

Browse files
committed
adding PS cmds
1 parent 11b356d commit eb154c5

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

articles/storage/common/account-encryption-key-create.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ az feature register --namespace Microsoft.Storage --name AllowAccountEncryptionK
5151
az feature register --namespace Microsoft.Storage --name AllowAccountEncryptionKeyForTables
5252
```
5353

54+
# [Template](#tab/template)
55+
56+
N/A
57+
5458
---
5559

5660
### Check the status of your registration
@@ -68,25 +72,45 @@ Get-AzProviderFeature -ProviderNamespace Microsoft.Storage -FeatureName AllowAcc
6872

6973
# [Azure CLI](#tab/azure-cli)
7074

71-
To check the status of your registration with Azure CLI, call the [az feature](/cli/azure/feature#az-feature-show).
75+
To check the status of your registration with Azure CLI, call the [az feature](/cli/azure/feature#az-feature-show) command.
7276

7377
```azurecli
7478
az feature show --namespace Microsoft.Storage --name AllowAccountEncryptionKeyForQueues
7579
az feature show --namespace Microsoft.Storage --name AllowAccountEncryptionKeyForTables
7680
```
7781

82+
# [Template](#tab/template)
83+
84+
N/A
85+
7886
---
7987

8088
### Re-register the Azure Storage resource provider
8189

82-
After your registration is approved, you must re-register the Azure Storage resource provider.
90+
After your registration is approved, you must re-register the Azure Storage resource provider. Use PowerShell or Azure CLI to re-register the resource provider.
91+
92+
# [PowerShell](#tab/powershell)
8393

84-
Call the [az provider register](/cli/azure/provider#az-provider-register) command:
94+
To re-register the resource provider with PowerShell, call the [Register-AzResourceProvider](/powershell/module/az.resources/register-azresourceprovider) command.
95+
96+
```powershell
97+
Register-AzResourceProvider -ProviderNamespace 'Microsoft.Storage'
98+
```
99+
100+
# [Azure CLI](#tab/azure-cli)
101+
102+
To re-register the resource provider with Azure CLI, call the [az provider register](/cli/azure/provider#az-provider-register) command.
85103

86104
```azurecli
87105
az provider register --namespace 'Microsoft.Storage'
88106
```
89107

108+
# [Template](#tab/template)
109+
110+
N/A
111+
112+
---
113+
90114
## Create an account that uses the account encryption key
91115

92116
You must configure a new storage account to use the account encryption key for queues and tables at the time that you create the storage account. The scope of the encryption key cannot be changed after the account is created.
@@ -188,12 +212,32 @@ After you have created an account that relies on the account encryption key, see
188212

189213
To verify that a service in a storage account is using the account encryption key, call the Azure CLI [az storage account](/cli/azure/storage/account#az-storage-account-show) command. This command returns a set of storage account properties and their values. Look for the `keyType` field for each service within the encryption property and verify that it is set to `Account`.
190214

215+
# [PowerShell](#tab/powershell)
216+
217+
To verify that a service in a storage account is using the account encryption key, call the [Get-AzStorageAccount](/powershell/module/az.storage/get-azstorageaccount) command. This command returns a set of storage account properties and their values. Look for the `KeyType` field for each service within the `Encryption` property and verify that it is set to `Account`.
218+
219+
```powershell
220+
$account = Get-AzStorageAccount -ResourceGroupName <resource-group> -StorageAccountName <storage-account>
221+
$account.Encryption.Services.Queue
222+
$account.Encryption.Services.Table
223+
```
224+
225+
# [Azure CLI](#tab/azure-cli)
226+
227+
To verify that a service in a storage account is using the account encryption key, call the [az storage account](/cli/azure/storage/account#az-storage-account-show) command. This command returns a set of storage account properties and their values. Look for the `keyType` field for each service within the encryption property and verify that it is set to `Account`.
228+
191229
```azurecli
192230
az storage account show /
193231
--name <storage-account> /
194232
--resource-group <resource-group>
195233
```
196234

235+
# [Template](#tab/template)
236+
237+
N/A
238+
239+
---
240+
197241
## Next steps
198242

199243
- [Azure Storage encryption for data at rest](storage-service-encryption.md)

0 commit comments

Comments
 (0)