New-SqlCspColumnMasterKeySettings

SYNOPSIS

Creates a SqlColumnMasterKeySettings object describing an asymmetric key stored in a key store with a CSP supporting CAPI.

SYNTAX

New-SqlCspColumnMasterKeySettings [-CspProviderName] <String> [-KeyName] <String>
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]

DESCRIPTION

The New-SqlCspColumnMasterKeySettings cmdlet creates a SqlColumnMasterKeySettings object. The SqlColumnMasterKeySettings object references a key, stored in a key store using a Cryptographic Service Provider (CSP) supporting the Microsoft Crypto API (CAPI). The SqlColumnMasterKeySettings object has two properties: KeyStoreProviderName and KeyPath. This cmdlet sets the KeyStoreProviderName property to contain the name of the column master key store provider using CSP/CAPI, then generates and sets the value of the KeyPath property to referenced the specified key.

EXAMPLES

Example 1: Create a SqlColumnMasterKeySettings object

PS C:\> $CmkSettings = New-SqlCspColumnMasterKeySettings -CspProviderName "Microsoft Software Key Storage Provider" -KeyName "AlwaysEncryptedKey"

This command creates a SqlColumnMasterKeySettings object referencing a key in a key store encapsulated by a CSP provider called Microsoft Software Key Storage Provider.

PARAMETERS

-CspProviderName

Specifies the name of the CSP provider for the key store.

Type: String
Parameter Sets: (All)
Aliases: 

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

-KeyName

Specifies the name of the key in the key store.

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

SqlColumnMasterKeySettings

NOTES

Configure Always Encrypted using PowerShell

SQL Server Cmdlets