Complete-​Sql​Column​Master​Key​Rotation

Completes the rotation of a column master key.

Syntax

Complete-SqlColumnMasterKeyRotation
        [-InputObject] <Database>
        -SourceColumnMasterKeyName <String>
        [-Script]
        [-InformationAction <ActionPreference>]
        [-InformationVariable <String>]
        [<CommonParameters>]
Complete-SqlColumnMasterKeyRotation
        [[-Path] <String>]
        -SourceColumnMasterKeyName <String>
        [-Script]
        [-InformationAction <ActionPreference>]
        [-InformationVariable <String>]
        [<CommonParameters>]

Description

The Complete-SqlColumnMasterKeyRotation cmdlet completes the process of replacing an existing column master key with a new, target, column master key for the Always Encrypted feature. The cmdlet gets all column encryption key objects containing encrypted key values that are encrypted with the specified source column master key. The cmdlet then updates each column encryption key object to remove the entry for an encrypted value that was produced using the specified column master key. As a result, each impacted column encryption key object will have only one encrypted value entry, produced using the column master key that is the target of the rotation.

Examples

Example 1: Complete the process of rotating the column master key

PS C:\> Cleanup-SqlColumnMasterKey -SourceColumnMasterKeyName "CMK1"

This command completes the process of rotating the column master key named CMK1.

Required Parameters

-InputObject

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

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

Specifies the name of the source column master key.

Type:String
Position:Named
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 to the SQL database, for which this cmdlet runs the operation. If you do not specify a value for the parameter, the cmdlet uses the current working location.

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

Indicates that this cmdlet runs a script to complete the rotation of a column master key.

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