The Remove-AzKeyVaultKey cmdlet deletes a key in a key vault.
If the key was accidentally deleted the key can be recovered using Undo-AzKeyVaultKeyRemoval by a user with special 'recover' permissions.
This cmdlet has a value of high for the ConfirmImpact property.
This command removes the key named ITSoftware from the key vault named Contoso.
The command specifies the Force parameter, and, therefore, the cmdlet does not prompt you for confirmation.
Example 3: Purge a deleted key from the key vault permanently
This command removes the key named ITSoftware from the key vault named Contoso permanently.
Executing this cmdlet requires the 'purge' permission, which must have been previously and explicitly granted to the user for this key vault.
Example 4: Remove keys by using the pipeline operator
This command gets all the keys in the key vault named Contoso, and passes them to the Where-Object cmdlet by using the pipeline operator.
That cmdlet passes the keys that have a value of $False for the Enabled attribute to the current cmdlet.
That cmdlet removes those keys.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Specifies the name of the key to remove.
This cmdlet constructs the fully qualified domain name (FQDN) of a key based on the name that this parameter specifies, the name of the key vault, and your current environment.
Indicates that this cmdlet returns a Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey object.
By default, this cmdlet does not generate any output.
Specifies the name of the key vault from which to remove the key.
This cmdlet constructs the FQDN of a key vault based on the name that this parameter specifies and your current environment.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.