< Back

Remove-AzureRmSqlServerKeyVaultKey

Tue Jan 29, 2019 10:10 pm

NAME Remove-AzureRmSqlServerKeyVaultKey



SYNOPSIS

Removes a Key Vault key from a SQL server.





SYNTAX

Remove-AzureRmSqlServerKeyVaultKey [-ResourceGroupName] <String> [-ServerName] <String> [-KeyId] <String> [-AsJob] [-DefaultProfile

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





DESCRIPTION

The Remove-AzureRmSqlServerKeyVaultKey cmdlet removes the Key Vault key from the specified SQL server.



Note that the SQL server's permissions to the key's vault are not changed. To change permissions, use Set-AzureRmKeyVaultAccessPolicy.



Note that this cmdlet makes no changes to Key Vault. To remove a key from Key Vault, use Remove-AzureKeyVaultKey.





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



-KeyId <String>

The Azure Key Vault KeyId.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the resource group



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

The Azure Sql Server name.



Required? true

Position? 1

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.



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

System.String







OUTPUTS

System.Object







NOTES









Example 1: Remove a Key Vault key



PS C:\\> Remove-AzureRmSqlServerKeyVaultKey -KeyId 'https://contoso.vault.azure.net/keys/co ... 2345678901' -ServerName

'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'



This command removes the Key Vault key with Id 'https://contoso.vault.azure.net/keys/co ... 2345678901' from the

specified server.



ResourceGroupName : ContosoResourceGroup ServerName : ContosoServer ServerKeyName : contoso_contosokey_01234567890123456789012345678901

Type : AzureKeyVault Uri : https://contoso.vault.azure.net/keys/co ... 2345678901 Thumbprint

: 1122334455667788990011223344556677889900 CreationDate : 1/1/2017 12:00:00 AM







RELATED LINKS

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

SQL Database Documentation https://docs.microsoft.com/azure/sql-database/