Skip to content

Fix Az.KeyVault Syntax Errors #17601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Exports the security domain data of a managed HSM for importing on another HSM.

### Example 1
```powershell
Export-AzKeyVaultSecurityDomain -Name testmhsm -Certificates {pathOfCertificates}/sd1.cer, {pathOfCertificates}/sd2.cer, {pathOfCertificates}/sd3.cer -OutputPath {pathOfOutput}/sd.ps.json -Quorum 2
Export-AzKeyVaultSecurityDomain -Name testmhsm -Certificates sd1.cer, sd2.cer, sd3.cer -OutputPath sd.ps.json -Quorum 2
```

This command retrieves the managed HSM named testmhsm and saves a backup of that managed HSM security domain to the specified output file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This cmdlet imports previously exported security domain data to a managed HSM.
### Example 1
```powershell
$keys = @{PublicKey = "sd1.cer"; PrivateKey = "sd1.key"}, @{PublicKey = "sd2.cer"; PrivateKey = "sd2.key"}, @{PublicKey = "sd3.cer"; PrivateKey = "sd3.key"}
Import-AzKeyVaultSecurityDomain -Name testmhsm -Keys $keys -SecurityDomainPath {pathOfBackup}\sd.ps.json
Import-AzKeyVaultSecurityDomain -Name testmhsm -Keys $keys -SecurityDomainPath sd.ps.json
```

First, the keys need be provided to decrypt the security domain data.
Expand Down
8 changes: 4 additions & 4 deletions src/KeyVault/KeyVault/help/Invoke-AzKeyVaultKeyOperation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Invoke-AzKeyVaultKeyOperation cmdlet supports
### Encrypts using an encryption key
```powershell
$result = Invoke-AzKeyVaultKeyOperation -Operation Encrypt -Algorithm RSA1_5 -VaultName test-kv -Name test-key -Value (ConvertTo-SecureString -String "test" -AsPlainText -Force) ult
$result | fl
$result | Format-List
```

```output
Expand All @@ -60,7 +60,7 @@ Encrypts string "test" using test-key stored in test-kv. The returned result is
```powershell
$result
$result = Invoke-AzKeyVaultKeyOperation -Operation Decrypt -Algorithm RSA1_5 -VaultName test-kv -Name test-key -Value (ConvertTo-SecureString -String $result.Result -AsPlainText -Force) ult
$result | fl
$result | Format-List
```

```output
Expand All @@ -75,7 +75,7 @@ Decrypts encrypted data that is encrypted using test-key stored in test-kv.
```powershell
$result = Invoke-AzKeyVaultKeyOperation -Operation Encrypt -Algorithm RSA1_5 -VaultName test-kv -Name test-key -Value (ConvertTo-SecureString -String "test" -AsPlainText -Force)

$result | fl
$result | Format-List
```

```output
Expand All @@ -90,7 +90,7 @@ Encrypts string "test" using test-key stored in test-kv. The returned result is
```powershell
$result = Invoke-AzKeyVaultKeyOperation -Operation Wrap -Algorithm RSA1_5 -VaultName test-kv -Name test-key -Value (ConvertTo-SecureString -String "ovQIlbB0DgWhZA7sgkPxbg9H-Ly-VlNGPSgGrrZvlIo" -AsPlainText -Force)

$result | fl
$result | Format-List
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Set-AzKeyVaultCertificateIssuer cmdlet sets a certificate issuer in a key va
### Example 1: Set a certificate issuer
```powershell
$AdminDetails = New-AzKeyVaultCertificateAdministratorDetail -FirstName user -LastName name -EmailAddress username@microsoft.com
$OrgDetails = New-AzKeyVaultCertificateOrganizationDetail -AdministrationDetails $AdminDetails
$OrgDetails = New-AzKeyVaultCertificateOrganizationDetail -AdministratorDetails $AdminDetails
$Password = ConvertTo-SecureString -String P@ssw0rd -AsPlainText -Force
Set-AzKeyVaultCertificateIssuer -VaultName "Contosokv01" -Name "TestIssuer01" -IssuerProvider "Test" -AccountId "555" -ApiKey $Password -OrganizationDetails $OrgDetails -PassThru
```
Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/KeyVault/help/Update-AzKeyVaultManagedHsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This cmdlet updates the state of an Azure managed HSM.

### Example 1: Update a managed Hsm directly
```powershell
Update-AzKeyVaultManagedHsm -Name $hsmName -ResourceGroupName $resourceGroupName -Tag @{testKey="testValue"} | fl
Update-AzKeyVaultManagedHsm -Name $hsmName -ResourceGroupName $resourceGroupName -Tag @{testKey="testValue"} | Format-List
```

```output
Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/KeyVault/help/Update-AzKeyVaultSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ContosoVault, using the stored variables.

### Example 2: Delete the tags and content type for a secret
```powershell
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType '' -Tag -@{}
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType '' -Tag @{}
```

This command deletes the tags and the content type for the specified version of the secret named HR
Expand Down