New-SqlBackupEncryptionOption
建立 Backup-SqlDatabase Cmdlet 或 Set-SqlSmartAdmin Cmdlet 的加密選項。
Syntax
New-SqlBackupEncryptionOption
[-NoEncryption]
[-Algorithm <BackupEncryptionAlgorithm>]
[-EncryptorType <BackupEncryptorType>]
[-EncryptorName <String>]
[<CommonParameters>]
Description
New-SqlBackupEncryptionOption Cmdlet 會建立Backup-SqlDatabase Cmdlet 或Set-SqlSmartAdmin Cmdlet 的加密選項。
範例
範例 1:建立加密選項
PS C:\> $EncryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
此命令會建立加密選項,並將結果儲存在名為 $EncrytionOption 的變數中
參數
-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
指定伺服器憑證或伺服器非對稱金鑰的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EncryptorType
指定加密程式類型。
Type: | BackupEncryptorType |
Accepted values: | ServerCertificate, ServerAsymmetricKey |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoEncryption
表示此 Cmdlet 會停用加密。 這個參數不能搭配任何其他參數使用。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸出
Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions
此 Cmdlet 會做為 Backup-SqlDatabase 和 Set-SqlSmartAdmin Cmdlet 之 EncryptionOption 參數的輸入。