Skip to content

Commit 20181b4

Browse files
authored
Merge pull request #50272 from barclayn/keyvault-quickstart
adding the interactive option in response to a github issue
2 parents 0644324 + c15ceab commit 20181b4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/key-vault/quick-create-powershell.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: quickstart
1515
ms.custom: mvc
16-
ms.date: 05/10/2018
16+
ms.date: 08/28/2018
1717
ms.author: barclayn
1818
#Customer intent:As a security admin who is new to Azure, I want to use Key Vault to securely store keys and passwords in Azure
1919

@@ -28,15 +28,15 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2828

2929
If you choose to install and use PowerShell locally, this tutorial requires Azure PowerShell module version 5.1.1 or later. Run `Get-Module -ListAvailable AzureRM` to find the version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-azurerm-ps). If you are running PowerShell locally, you also need to run `Login-AzureRmAccount` to create a connection with Azure.
3030

31-
```azurepowershell
31+
```azurepowershell-interactive
3232
Login-AzureRmAccount
3333
```
3434

3535
## Create a resource group
3636

3737
Create an Azure resource group with [New-AzureRmResourceGroup](/powershell/module/azurerm.resources/new-azurermresourcegroup). A resource group is a logical container into which Azure resources are deployed and managed.
3838

39-
```azurepowershell
39+
```azurepowershell-interactive
4040
New-AzureRmResourceGroup -Name ContosoResourceGroup -Location EastUS
4141
```
4242

@@ -50,7 +50,7 @@ Although we use “Contoso KeyVault2” as the name for our Key Vault throughout
5050
- **Resource group name** ContosoResourceGroup.
5151
- **Location** East US.
5252

53-
```azurepowershell
53+
```azurepowershell-interactive
5454
New-AzureRmKeyVault -VaultName 'Contoso-Vault2' -ResourceGroupName 'ContosoResourceGroup' -Location 'East US'
5555
```
5656

@@ -69,19 +69,19 @@ To add a secret to the vault, you just need to take a couple of steps. In this c
6969

7070
First convert the value of Pa$$w0rd to a secure string by typing:
7171

72-
```azurepowershell
72+
```azurepowershell-interactive
7373
$secretvalue = ConvertTo-SecureString 'Pa$$w0rd' -AsPlainText -Force
7474
```
7575

7676
Then, type the PowerShell commands below to create a secret in Key Vault called **ExamplePassword** with the value **Pa$$w0rd** :
7777

78-
```azurepowershell
78+
```azurepowershell-interactive
7979
$secret = Set-AzureKeyVaultSecret -VaultName 'ContosoKeyVault' -Name 'ExamplePassword' -SecretValue $secretvalue
8080
```
8181

8282
To view the value contained in the secret as plain text:
8383

84-
```azurepowershell
84+
```azurepowershell-interactive
8585
(Get-AzureKeyVaultSecret -vaultName "Contosokeyvault" -name "ExamplePassword").SecretValueText
8686
```
8787

@@ -93,7 +93,7 @@ Now, you have created a Key Vault, stored a secret, and retrieved it.
9393

9494
When no longer needed, you can use the [Remove-AzureRmResourceGroup](/powershell/module/azurerm.resources/remove-azurermresourcegroup) command to remove the resource group, Key Vault, and all related resources.
9595

96-
```azurepowershell
96+
```azurepowershell-interactive
9797
Remove-AzureRmResourceGroup -Name ContosoResourceGroup
9898
```
9999

0 commit comments

Comments
 (0)