Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Remove-AzSqlServerKeyVaultKey
- Module:
- Az.Sql Module
Removes a Key Vault key from a SQL server.
Syntax
Default (Default)
Remove-AzSqlServerKeyVaultKey
[-KeyId] <String>
[-AsJob]
[-ServerName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzSqlServerKeyVaultKey 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-AzKeyVaultAccessPolicy. Note that this cmdlet makes no changes to Key Vault. To remove a key from Key Vault, use Remove-AzKeyVaultKey.
Examples
Example 1: Remove a Key Vault key
Remove-AzSqlServerKeyVaultKey -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901' -ServerName 'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
ResourceGroupName : ContosoResourceGroup
ServerName : ContosoServer
ServerKeyName : contoso_contosokey_01234567890123456789012345678901
Type : AzureKeyVault
Uri : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
Thumbprint : 1122334455667788990011223344556677889900
CreationDate : 1/1/2017 12:00:00 AM
This command removes the Key Vault key with Id 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901' from the specified server.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-KeyId
The Azure Key Vault KeyId.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
The name of the resource group
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ServerName
The Azure Sql Server name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
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.
Inputs
String
Outputs
AzureSqlServerKeyVaultKeyModel
Related Links
Azure PowerShell
Feedback
Was this page helpful?
