次の方法で共有


New-SqlCngColumnMasterKeySettings

CNG API をサポートするキー ストアに格納されている非対称キーを記述する SqlColumnMasterKeySettings オブジェクトを作成します。

構文

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

説明

New-SqlCngColumnMasterKeySettings コマンドレットは、SqlColumnMasterKeySettings オブジェクトを作成します。 SqlColumnMasterKeySettings オブジェクトは、Cryptography Next Generation (CNG) API をサポートするキー ストアに格納されているキーを参照します。 SqlColumnMasterKeySettings オブジェクトには、KeyStoreProviderName と KeyPath の 2 つのプロパティがあります。 このコマンドレットは、CNG の列マスター キー ストア プロバイダーの名前を含む KeyStoreProviderName プロパティを設定し、指定したキーを参照する KeyPath プロパティの値を生成して設定します。

例 1: SqlColumnMasterKeySettings オブジェクトを作成する

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

このコマンドは、Microsoft Software Key Storage Provider という名前の CNG プロバイダーによってカプセル化されたキー ストア内のキーを参照する SqlColumnMasterKeySettings オブジェクトを作成します。 その後、コマンドは操作の結果を $CMKSettings という名前の変数に格納します。

パラメーター

-CngProviderName

キー ストアの CNG プロバイダーの名前を指定します。

型:String
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-KeyName

キー ストア内のキーの名前を指定します。

型:String
配置:1
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

出力

SqlColumnMasterKeySettings