New-SqlCspColumnMasterKeySettings
创建一个 SqlColumnMasterKeySettings 对象,该对象描述使用 CSP 支持 CAPI 的密钥存储中存储的非对称密钥。
语法
New-SqlCspColumnMasterKeySettings
[-CspProviderName] <String>
[-KeyName] <String>
[<CommonParameters>]
说明
New-SqlCspColumnMasterKeySettings cmdlet 创建 SqlColumnMasterKeySettings 对象。 SqlColumnMasterKeySettings 对象引用密钥,该密钥存储在密钥存储中,该密钥存储使用支持 Microsoft Crypto API (CAPI) 的加密服务提供程序(CSP)。 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软件密钥存储提供程序的 CSP 提供程序封装的密钥存储中的密钥。
参数
-CspProviderName
指定密钥存储的 CSP 提供程序的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-KeyName
指定密钥存储区中的密钥的名称。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
输出
SqlColumnMasterKeySettings