Skip to content

Commit 6e085e3

Browse files
authored
Merge pull request #103695 from tamram/tamram-0207a
update PS instructions to check installed version
2 parents ddb0d4b + c1727bc commit 6e085e3

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 01/17/2020
10+
ms.date: 02/07/2020
1111
ms.author: tamram
1212
ms.subservice: common
1313
---
@@ -30,7 +30,15 @@ None.
3030

3131
# [PowerShell](#tab/azure-powershell)
3232

33-
This how-to article requires the Azure PowerShell module Az version 0.7 or later. Run `Get-Module -ListAvailable Az` to find your current version. If you need to install or upgrade, see [Install Azure PowerShell module](/powershell/azure/install-Az-ps).
33+
To create an Azure storage account with PowerShell, make sure you have installed Azure PowerShell module Az version 0.7 or later. For more information, see [Introducing the Azure PowerShell Az module](/powershell/azure/new-azureps-module-az).
34+
35+
To find your current version, run the following command:
36+
37+
```powershell
38+
Get-InstalledModule -Name "Az"
39+
```
40+
41+
To install or upgrade Azure PowerShell, see [Install Azure PowerShell module](/powershell/azure/install-Az-ps).
3442

3543
# [Azure CLI](#tab/azure-cli)
3644

@@ -79,7 +87,7 @@ To launch Azure Cloud Shell, sign in to the [Azure portal](https://portal.azure.
7987

8088
To log into your local installation of the CLI, run the [az login](/cli/azure/reference-index#az-login) command:
8189

82-
```cli
90+
```azurecli-interactive
8391
az login
8492
```
8593

@@ -109,14 +117,14 @@ First, create a new resource group with PowerShell using the [New-AzResourceGrou
109117
# put resource group in a variable so you can use the same group name going forward,
110118
# without hard-coding it repeatedly
111119
$resourceGroup = "storage-resource-group"
120+
$location = "westus"
112121
New-AzResourceGroup -Name $resourceGroup -Location $location
113122
```
114123

115124
If you're not sure which region to specify for the `-Location` parameter, you can retrieve a list of supported regions for your subscription with the [Get-AzLocation](/powershell/module/az.resources/get-azlocation) command:
116125

117126
```powershell
118127
Get-AzLocation | select Location
119-
$location = "westus"
120128
```
121129

122130
Next, create a general-purpose v2 storage account with read-access geo-redundant storage (RA-GRS) by using the [New-AzStorageAccount](/powershell/module/az.storage/New-azStorageAccount) command. Remember that the name of your storage account must be unique across Azure, so replace the placeholder value in brackets with your own unique value:
@@ -130,7 +138,7 @@ New-AzStorageAccount -ResourceGroupName $resourceGroup `
130138
```
131139

132140
> [!IMPORTANT]
133-
> If you plan to use [Azure Data Lake Storage](https://azure.microsoft.com/services/storage/data-lake-storage/), include `-EnableHierarchicalNamespace $True` in this list of parameters.
141+
> If you plan to use [Azure Data Lake Storage](https://azure.microsoft.com/services/storage/data-lake-storage/), include `-EnableHierarchicalNamespace $True` in this list of parameters.
134142
135143
To create a general-purpose v2 storage account with a different replication option, substitute the desired value in the table below for the **SkuName** parameter.
136144

0 commit comments

Comments
 (0)