New-SqlBackupEncryptionOption
Creates the encryption options for the Backup-SqlDatabase cmdlet or the Set-SqlSmartAdmin cmdlet.
Syntax
Default (Default)
New-SqlBackupEncryptionOption
[-NoEncryption]
[-Algorithm <BackupEncryptionAlgorithm>]
[-EncryptorType <BackupEncryptorType>]
[-EncryptorName <String>]
[<CommonParameters>]
Description
The New-SqlBackupEncryptionOption cmdlet creates the encryption options for the Backup-SqlDatabase cmdlet or the Set-SqlSmartAdmin cmdlet.
Examples
Example 1: Create encryption options
PS C:\> $EncryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
This command creates the encryption options and stores the result in the variable named $EncrytionOption
Parameters
-Algorithm
Specifies the encryption algorithm.
Parameter properties
Type: | BackupEncryptionAlgorithm |
Default value: | None |
Accepted values: | Aes128, Aes192, Aes256, TripleDes |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EncryptorName
Specifies the name of the server certificate or server asymmetric key.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EncryptorType
Specifies the encryptor type.
Parameter properties
Type: | BackupEncryptorType |
Default value: | None |
Accepted values: | ServerCertificate, ServerAsymmetricKey |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NoEncryption
Indicates that this cmdlet disables encryption. This parameter cannot be used with any other parameters.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions
This cmdlet is used as input to the EncryptionOption parameter for the Backup-SqlDatabase and Set-SqlSmartAdmin cmdlets.