New-​Sql​Backup​Encryption​Option

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

Syntax

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

Optional Parameters

-Algorithm

Specifies the encryption algorithm. The acceptable values for this parameter are:

  • AES128
  • AES192
  • AES256
  • TripleDes
Type:BackupEncryptionAlgorithm
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-EncryptorType

Specifies the encryptor type. The acceptable values for this parameter are:

  • ServerCertificate
  • ServerAsymmetricKey
Type:BackupEncryptorType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
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
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.