New-SqlColumnMasterKeySettings

SYNOPSIS

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
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyPath

Specifies the key path.

Type: String
Parameter Sets: (All)
Aliases: 

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
Parameter Sets: (All)
Aliases: infa

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

-InformationVariable

Specifies an information variable.

Type: String
Parameter Sets: (All)
Aliases: iv

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Configure Always Encrypted using PowerShell

New-SqlCngColumnMasterKeySettings

New-SqlCspColumnMasterKeySettings