New-SqlCngColumnMasterKeySettings

Creates a SqlColumnMasterKeySettings object describing an asymmetric key stored in a key store supporting the CNG API.

语法

Default (默认值)

New-SqlCngColumnMasterKeySettings
    [-CngProviderName] <String>
    [-KeyName] <String>
    [<CommonParameters>]

说明

The New-SqlCngColumnMasterKeySettings cmdlet creates a SqlColumnMasterKeySettings object. The SqlColumnMasterKeySettings object references a key, stored in a key store supporting the Cryptography Next Generation (CNG) API. 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 for CNG, then generates and sets the value of the KeyPath property to reference the specified key.

示例

Example 1: Create a SqlColumnMasterKeySettings object

PS C:\> $CMKSettings = New-SqlCngColumnMasterKeySettings -CngProviderName "Microsoft Software Key Storage Provider" -KeyName "AlwaysEncryptedKey"

This command creates a SqlColumnMasterKeySettings object referencing a key in a key store encapsulated by a CNG provider named Microsoft Software Key Storage Provider. The command then stores the result of the operation in the variable named $CMKSettings.

参数

-CngProviderName

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

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-KeyName

Specifies the name of the key in the key store.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:1
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

输出

SqlColumnMasterKeySettings