< Back

Remove-AzureRmKeyVault

Tue Jan 29, 2019 9:50 pm

NAME Remove-AzureRmKeyVault



SYNOPSIS

Deletes a key vault.





SYNTAX

Remove-AzureRmKeyVault [-InputObject] <PSKeyVault> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-Force] [-PassThru] [-Confirm] [-WhatIf]

[<CommonParameters>]



Remove-AzureRmKeyVault [-InputObject] <PSKeyVault> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-Force] -InRemovedState [-PassThru]

[-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmKeyVault [-VaultName] <String> [-Location] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-Force] -InRemovedState

[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmKeyVault [-VaultName] <String> [[-ResourceGroupName] <String>] [[-Location] <String>] [-AsJob] [-DefaultProfile

<IAzureContextContainer>] [-Force] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Remove-AzureRmKeyVault cmdlet deletes the specified key vault. It also deletes all keys and secrets contained in that instance.



Note that although specifying the resource group is optional for this cmdlet, you should so for better performance.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that the cmdlet does not prompt you for confirmation. By default, this cmdlet prompts you to confirm that you want to delete the key

vault.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <PSKeyVault>

Key Vault object to be deleted.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-InRemovedState [<SwitchParameter>]

Remove the previously deleted vault permanently.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Location <String>

The location of the deleted vault.



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

This Cmdlet does not return an object by default. If this switch is specified, it returns true if successful.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of a resource group.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VaultName <String>

Specifies the name of the key vault to remove.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

System.Boolean







NOTES









Example 1: Remove a key vault



PS C:\\>Remove-AzureRmKeyVault -VaultName "Contoso03Vault"



This command removes the key vault named Contoso03Vault from your current subscription.





Example 2: Remove a key vault from a specified resource group



PS C:\\>Remove-AzureRmKeyVault -VaultName "Contoso03Vault" -ResourceGroupName "Group14"



This command removes the key vault named Contoso03Vault from the named resource group. If you do not specify the resource group name, the cmdlet

searches for the named key vault to delete in your current subscription.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... rmkeyvault

Get-AzureRmKeyVault

New-AzureRmKeyVault