Skip to content
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
19 changes: 19 additions & 0 deletions src/KeyVault/KeyVault.Test/PesterTests/Key.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$vaultName = 'yemingkv27'


. "$PSScriptRoot\..\Scripts\Common.ps1"

Describe "Update key" {
It "should update multiple versions" {
$keyName = Get-KeyName
Add-AzKeyVaultKey -VaultName $vaultName -Name $keyName -Destination Software
Add-AzKeyVaultKey -VaultName $vaultName -Name $keyName -Destination Software
Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | Should -HaveCount 2

Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | Update-AzKeyVaultKey -Enable $false
Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | ForEach-Object { $_.Enabled | Should -BeFalse }

Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | Update-AzKeyVaultKey -Enable $true
Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | ForEach-Object { $_.Enabled | Should -BeTrue }
}
}
1 change: 1 addition & 0 deletions src/KeyVault/KeyVault/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
## Upcoming Release
* Added a new parameter `-AsPlainText` to `Get-AzKeyVaultSecret` to directly return the secret in plain text
* Supported selective restore a key from a managed HSM full backup [#13526]
* Fixed some minor issues [#13583] [#13584]
* Added missing return objects of `Get-Secret` in SecretManagement module

## Version 3.2.0
Expand Down
3 changes: 0 additions & 3 deletions src/KeyVault/KeyVault/Commands/GetAzureKeyVaultKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,13 @@ public class GetAzureKeyVaultKey : KeyVaultCmdletBase
/// KeyVault resource id
/// </summary>
[Parameter(Mandatory = true,
Position = 0,
ValueFromPipelineByPropertyName = true,
ParameterSetName = ResourceIdByVaultNameParameterSet,
HelpMessage = "KeyVault Resource Id.")]
[Parameter(Mandatory = true,
Position = 0,
ValueFromPipelineByPropertyName = true,
ParameterSetName = ResourceIdByKeyNameParameterSet)]
[Parameter(Mandatory = true,
Position = 0,
ValueFromPipelineByPropertyName = true,
ParameterSetName = ResourceIdByKeyVersionsParameterSet)]
[ValidateNotNullOrEmpty]
Expand Down
1 change: 1 addition & 0 deletions src/KeyVault/KeyVault/Commands/UpdateAzureKeyVaultKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ private void NormalizeParameterSets()
VaultName = InputObject.VaultName;
}
Name = InputObject.Name;
Version = InputObject.Version;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.Commands.NewAzureManagedHsmRoleAssignment","New-AzManagedHsmRoleAssignment","0","1000","The cmdlet 'New-AzManagedHsmRoleAssignment' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'New-AzManagedHsmRoleAssignment' back to the module, or add an alias to the original cmdlet name."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.Commands.RemoveAzureManagedHsmRoleAssignment","Remove-AzManagedHsmRoleAssignment","0","1000","The cmdlet 'Remove-AzManagedHsmRoleAssignment' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Remove-AzManagedHsmRoleAssignment' back to the module, or add an alias to the original cmdlet name."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.Commands.UndoAzureManagedHsmKeyRemoval","Undo-AzManagedHsmKeyRemoval","0","1000","The cmdlet 'Undo-AzManagedHsmKeyRemoval' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Undo-AzManagedHsmKeyRemoval' back to the module, or add an alias to the original cmdlet name."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.Commands.UpdateAzureManagedHsm","Update-AzManagedHsm","0","1000","The cmdlet 'Update-AzManagedHsm' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Update-AzManagedHsm' back to the module, or add an alias to the original cmdlet name."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.Commands.UpdateAzureManagedHsm","Update-AzManagedHsm","0","1000","The cmdlet 'Update-AzManagedHsm' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Update-AzManagedHsm' back to the module, or add an alias to the original cmdlet name."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.GetAzureKeyVaultKey","Get-AzKeyVaultKey","0","1050","The parameter set 'ByResourceIdVaultName' for cmdlet 'Get-AzKeyVaultKey' has been removed.","Add parameter set 'ByResourceIdVaultName' back to cmdlet 'Get-AzKeyVaultKey'."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.GetAzureKeyVaultKey","Get-AzKeyVaultKey","0","1050","The parameter set 'ByResourceIdKeyName' for cmdlet 'Get-AzKeyVaultKey' has been removed.","Add parameter set 'ByResourceIdKeyName' back to cmdlet 'Get-AzKeyVaultKey'."
"Microsoft.Azure.PowerShell.Cmdlets.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.GetAzureKeyVaultKey","Get-AzKeyVaultKey","0","1050","The parameter set 'ByResourceIdKeyVersions' for cmdlet 'Get-AzKeyVaultKey' has been removed.","Add parameter set 'ByResourceIdKeyVersions' back to cmdlet 'Get-AzKeyVaultKey'."