Remove-​Sql​Column​Encryption​Key

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.

Required Parameters

-InputObject

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

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

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

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

Optional Parameters

-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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
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
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Script

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

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