New-SqlCspColumnMasterKeySettings
创建一个 SqlColumnMasterKeySettings 对象,该对象描述使用 CSP 支持 CAPI 的密钥存储在密钥存储中的非对称密钥。
语法
New-SqlCspColumnMasterKeySettings
[-CspProviderName] <String>
[-KeyName] <String>
[<CommonParameters>]
说明
New-SqlCspColumnMasterKeySettings cmdlet 创建 SqlColumnMasterKeySettings 对象。 SqlColumnMasterKeySettings 对象引用使用加密服务提供程序 (CSP 存储在密钥存储中的密钥,) 支持 Microsoft Crypto API (CAPI) 。 SqlColumnMasterKeySettings 对象有两个属性:KeyStoreProviderName 和 KeyPath。 此 cmdlet 将 KeyStoreProviderName 属性设置为使用 CSP/CAPI 包含列主密钥存储提供程序的名称,然后生成并设置 KeyPath 属性的值以引用指定的密钥。
示例
示例 1:创建 SqlColumnMasterKeySettings 对象
PS C:\> $CmkSettings = New-SqlCspColumnMasterKeySettings -CspProviderName "Microsoft Software Key Storage Provider" -KeyName "AlwaysEncryptedKey"
此命令创建一个 SqlColumnMasterKeySettings 对象,该对象引用由名为 Microsoft Software Key Storage Provider 的 CSP 提供程序封装的密钥存储中的密钥。
参数
-CspProviderName
指定密钥存储的 CSP 提供程序的名称。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyName
指定密钥存储区中的密钥的名称。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输出
SqlColumnMasterKeySettings