Remove-​Sql​Column​Master​Key

Removes the column master key object from the database.

Syntax

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

Description

The Remove-SqlColumnMasterKey cmdlet removes the column master key object with the specified name from the database.

Examples

Example 1: Remove a column master key object from the database

PS C:\> Remove-SqlColumnMasterKey -Name "CMK1"

This command removes the column master key object named CMK1 from the database.

Required Parameters

-InputObject

Specifies the SQL database object, for which this cmdlet performs 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 master 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, the 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