New-SqlCngColumnMasterKeySettings
Creates a SqlColumnMasterKeySettings object describing an asymmetric key stored in a key store supporting the CNG API.
Syntax
New-SqlCngColumnMasterKeySettings
[-CngProviderName] <String>
[-KeyName] <String>
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
Description
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.
Examples
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.
Parameters
-CngProviderName
Specifies the name of the CNG provider for the key store.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyName
Specifies the name of the key in the key store.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
SqlColumnMasterKeySettings