New-SqlBackupEncryptionOption

Creates the encryption options for the Backup-SqlDatabase cmdlet or the Set-SqlSmartAdmin cmdlet.

Syntax

New-SqlBackupEncryptionOption
   [-NoEncryption]
   [-Algorithm <BackupEncryptionAlgorithm>]
   [-EncryptorType <BackupEncryptorType>]
   [-EncryptorName <String>]
   [-ProgressAction <ActionPreference>]
   [<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.

Type:BackupEncryptionAlgorithm
Accepted values:Aes128, Aes192, Aes256, TripleDes
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptorName

Specifies the name of the server certificate or server asymmetric key.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptorType

Specifies the encryptor type.

Type:BackupEncryptorType
Accepted values:ServerCertificate, ServerAsymmetricKey
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NoEncryption

Indicates that this cmdlet disables encryption. This parameter cannot be used with any other parameters.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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

Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions

This cmdlet is used as input to the EncryptionOption parameter for the Backup-SqlDatabase and Set-SqlSmartAdmin cmdlets.