Skip to content

Commit 9bae66b

Browse files
authored
Merge pull request #100285 from nohwnd/patch-1
Update multiline-secrets.md
2 parents 96fde8d + 92458b8 commit 9bae66b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

articles/key-vault/secrets/multiline-secrets.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ You can then view the stored secret using the Azure CLI [az keyvault secret show
3939
az keyvault secret show --name "MultilineSecret" --vault-name "<your-unique-keyvault-name>" --query "value"
4040
```
4141

42-
The secret will be returned with newlines embedded:
42+
The secret will be returned with `\n` in place of newline:
4343

4444
```bash
4545
"This is\nmy multi-line\nsecret"
4646
```
4747

48+
The `\n` above is a `\` and `n` character, not the newline character. Quotes `"` are included in the string.
49+
4850
## Set the secret using Azure Powershell
4951

5052
With Azure PowerShell, you must first read in the file using the [Get-Content](/powershell/module/microsoft.powershell.management/get-content) cmdlet, then convert it to a secure string using [ConvertTo-SecureString](/powershell/module/microsoft.powershell.security/convertto-securestring).
@@ -66,12 +68,14 @@ You can then view the stored secret using the Azure CLI [az keyvault secret show
6668
az keyvault secret show --name "MultilineSecret" --vault-name "<your-unique-keyvault-name>" --query "value"
6769
```
6870

69-
The secret will be returned with newlines embedded:
71+
The secret will be returned with `\n` in place of newline:
7072

7173
```bash
7274
"This is\nmy multi-line\nsecret"
7375
```
7476

77+
The `\n` above is a `\` and `n` character, not the newline character. Quotes `"` are included in the string.
78+
7579
## Next steps
7680

7781
- Read an [Overview of Azure Key Vault](../general/overview.md)

0 commit comments

Comments
 (0)