New-SqlBackupEncryptionOption
建立 Backup-SqlDatabase Cmdlet 或 Set-SqlSmartAdmin Cmdlet 的加密選項。
語法
New-SqlBackupEncryptionOption
[-NoEncryption]
[-Algorithm <BackupEncryptionAlgorithm>]
[-EncryptorType <BackupEncryptorType>]
[-EncryptorName <String>]
[-ProgressAction <ActionPreference>]
[<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
指定加密演算法。
類型: | BackupEncryptionAlgorithm |
接受的值: | Aes128, Aes192, Aes256, TripleDes |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EncryptorName
指定伺服器證書或伺服器非對稱金鑰的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EncryptorType
指定加密程序類型。
類型: | BackupEncryptorType |
接受的值: | ServerCertificate, ServerAsymmetricKey |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-NoEncryption
表示此 Cmdlet 會停用加密。 此參數不能與任何其他參數搭配使用。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ProgressAction
決定 PowerShell 如何回應腳本、Cmdlet 或提供者所產生的進度更新,例如 Write-Progress Cmdlet 所產生的進度列。 Write-Progress Cmdlet 會建立顯示命令狀態的進度列。
類型: | ActionPreference |
別名: | proga |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸出
Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions
此 Cmdlet 會作為 Backup-SqlDatabase 和 Set-SqlSmartAdmin Cmdlet 之 EncryptionOption 參數的輸入。