Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-AzureKeyVaultKey

Remove-AzureKeyVaultKey

microsoft.azure.commands.keyvault.dll

Synopsis

Deletes a key in a vault.

Syntax

Remove-AzureKeyVaultKey [-VaultName] [-Name] [-Force] [-PassThru] [-Profile] [<CommonParameters>]

Detailed Description

The Remove-AzureKeyVaultKey cmdlet deletes a key in an Azure Key Vault. This cmdlet has a value of high for the ConfirmImpact property.

Parameters

-Force <SwitchParameter>

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Name <String>

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 vault, and your current environment.

Aliases

KeyName

Required?

true

Position

2

Default value

none

Accept pipeline input?

true(ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Indicates that this cmdlet returns a Microsoft.Azure.Commands.KeyVault.Models.KeyBundle object. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-VaultName <String>

Specifies the name of the vault from which to remove the key. This cmdlet constructs the FQDN of a vault based on the name that this parameter specifies and your current environment.

Aliases

none

Required?

true

Position

1

Default value

none

Accept pipeline input?

true(ByPropertyName)

Accept wildcard characters?

false

Input Type

String

Return Type

Microsoft.Azure.Commands.KeyVault.Models.KeyBundle

Notes

None

Examples

Example 1: Remove a key from a vault

This command removes the key named ITSoftware from the vault named Contoso.

PS C:\>Remove-AzureKeyVaultKey -VaultName "Contoso" -Name "ITSoftware"

Example 2: Remove a key without user confirmation

This command removes the key named ITSoftware from the vault named Contoso. The command specifies the Force and Confirm parameters, and, therefore, the cmdlet does not prompt you for confirmation.

PS C:\>Remove-AzureKeyVaultKey -VaultName "Contoso" -Name "ITSoftware" -Force -Confirm:$False

Example 3: Remove keys by using the pipeline operator

This command gets all the keys in the 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.

PS C:\>Get-AzureKeyVaultKey -VaultName "Contoso" | Where-Object {$_.Attributes.Enabled -eq $False} | Remove-AzureKeyVaultKey

Online Version
Add-AzureKeyVaultKey
Get-AzureKeyVaultKey
Set-AzureKeyVaultKeyAttribute