New-SqlColumnMasterKeySettings

Creates a SqlColumnMasterKeySettings object.

Syntax

New-SqlColumnMasterKeySettings [-KeyStoreProviderName] <String> [-KeyPath] <String>
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]

Description

The New-SqlColumnMasterKeySettings cmdlet creates a SqlColumnMasterKeySettings object, which references a key. The SqlColumnMasterKeySettings object has two properties: KeyStoreProviderName and KeyPath. Use the KeyStoreProviderName and KeyPath parameters to specify values for these properties.

Examples

Example 1: Create column master key settings that contain Azure Key Vault as the provider

PS C:\> $CmkSettings = New-SqlColumnMasterKeySettings -KeyStoreProviderName "AZURE_KEY_VAULT" -KeyPath "https://myvault.vault.azure.net:443/keys/CMK/4c05f1a41b12488f9cba2ea964b6a700"

This command creates a SqlColumnMasterKeySettings object that contains Azure Key Vault as the provider. The command stores the result in the $CmkSettings variable.

Example 2: Create column master key settings that contain a custom key provider

PS C:\> $CmkSettings = New-SqlColumnMasterKeySettings -KeyStoreProviderName "CUSTOM_PROVIDER" -KeyPath "\\SecureNetworkShare\Keys\AlwaysEncrypted.key"

This command creates a SqlColumnMasterKeySettings object that contains a custom key provider. The command stores the result in the $CmkSettings variable.

Parameters

-KeyStoreProviderName

Specifies the name of the key store provider.

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

Specifies the key path.

Type:String
Required:True
Position:1
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