New-SqlCspColumnMasterKeySettings
建立 SqlColumnMasterKeySettings 物件,描述以 CSP 支援 CAPI 儲存在金鑰存放區中的非對稱金鑰。
Syntax
New-SqlCspColumnMasterKeySettings
[-CspProviderName] <String>
[-KeyName] <String>
[<CommonParameters>]
Description
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 物件,參考 CSP 提供者所封裝的金鑰存放區中的金鑰,稱為 Microsoft 軟體金鑰儲存提供者。
參數
-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