Remove-SqlColumnEncryptionKey

Removes the column encryption key object from the database.

Syntax

Remove-SqlColumnEncryptionKey [-Name] <String> [-InputObject] <Database> [-Script]
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
Remove-SqlColumnEncryptionKey [-Name] <String> [[-Path] <String>] [-Script]
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]

Description

The Remove-SqlColumnEncryptionKey cmdlet removes the column encryption key object with the specified name from the database.

Examples

Example 1: Remove a column encryption key by name

PS C:\> Remove-SqlColumnEncryptionKey -Name "CEK1"

This command removes the column encryption key named CEK1.

Parameters

-Name

Specifies the name of the column encryption key object that this cmdlet removes.

Type:String
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the SQL database object, for which this cmdlet runs the operation.

Type:Database
Required:True
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Script

Indicates that this cmdlet returns a Transact-SQL script that performs the task that this cmdlet performs.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend

Type:ActionPreference
Aliases:infa
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Path

Specifies the path of the SQL database, for which this cmdlet runs the operation. If you do not specify a value for this parameter, this cmdlet uses the current working location.

Type:String
Required:False
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False