-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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} | ||
|
||
| ``` | ||
|
|
||
| First, the keys need be provided to decrypt the security domain data. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||||
|
||||||||||||
| $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 @{} |
There was a problem hiding this comment.
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 thatpathOfCertificatesis 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.certo./sd1, and{pathOfOutput}/sd.ps.jsontosd.ps.json.There was a problem hiding this comment.
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.