Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 {{pathOfCertificates}/sd1.cer, {pathOfCertificates}/sd2.cer, {pathOfCertificates}/sd3.cer} -OutputPath {{pathOfOutput}/sd.ps.json} -Quorum 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the original example, {} is not powershell gramma. It means that pathOfCertificates is a placeholder that user needs to replace with the real path.
If {} made our tooling think the example is wrong, I suggest replace {pathOfCertificates}/sd1.cer to ./sd1, and {pathOfOutput}/sd.ps.json to sd.ps.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. We will do that.

```

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 {{pathOfBackup}\sd.ps.json}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment

```

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 [email protected]
$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
4 changes: 3 additions & 1 deletion src/KeyVault/KeyVault/help/Update-AzKeyVaultSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ 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 -@{}
$Tags = @{ 'Severity' = 'medium'; 'HR' = 'true'}
$ContentType= 'xml'
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType $ContentType -Tag $Tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-Tag @{} (delete the dash before @)

No other errors here. The purpose of this command is to delete, so blank value is assigned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$Tags = @{ 'Severity' = 'medium'; 'HR' = 'true'}
$ContentType= 'xml'
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType $ContentType -Tag $Tags
$ContentType= 'xml'
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType $ContentType -Tag @{}

```

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