Skip to content

Conversation

@v-yuzhichen
Copy link
Contributor

Description

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

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.

### 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.

```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

Comment on lines 66 to 68
$Tags = @{ 'Severity' = 'medium'; 'HR' = 'true'}
$ContentType= 'xml'
Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version '9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType $ContentType -Tag $Tags
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 @{}

@v-yuzhichen v-yuzhichen assigned isra-fel and ziyuezh576 and unassigned v-yuzhichen Apr 1, 2022
@isra-fel isra-fel merged commit e9e4485 into Azure:main Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants