Add-AzSqlServerTransparentDataEncryptionCertificate
為指定的 SQL Server 實例新增透明數據加密憑證
語法
Add-AzSqlServerTransparentDataEncryptionCertificate
[-PassThru]
[-ResourceGroupName] <String>
[-ServerName] <String>
[-PrivateBlob] <SecureString>
[-Password] <SecureString>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzSqlServerTransparentDataEncryptionCertificate
[-PassThru]
[-SqlServer] <AzureSqlServerModel>
[-PrivateBlob] <SecureString>
[-Password] <SecureString>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzSqlServerTransparentDataEncryptionCertificate
[-PassThru]
[-SqlServerResourceId] <String>
[-PrivateBlob] <SecureString>
[-Password] <SecureString>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Add-AzSqlManagedInstanceTransparentDataEncryptionCertificate 為指定的 SQL Server 實例新增透明數據加密憑證
範例
範例 1
$securePrivateBlob = ConvertTo-SecureString -String "****" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
Add-AzSqlServerTransparentDataEncryptionCertificate -ResourceGroupName "YourResourceGroupName" -ServerName "YourServerName" -PrivateBlob $securePrivateBlob -Password $securePassword
使用資源組名和 SQL Server 名稱將 TDE 憑證新增至 SQL Server
範例 2
$securePrivateBlob = ConvertTo-SecureString -String "****" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
$server = Get-AzSqlServer -ServerName "YourServerName" -ResourceGroupName "YourResourceGroupName"
Add-AzSqlServerTransparentDataEncryptionCertificate -SqlServerResourceId $server.ResourceId -PrivateBlob $securePrivateBlob -Password $securePassword
使用伺服器 resourceId 將 TDE 憑證新增至伺服器
範例 3
$securePrivateBlob = ConvertTo-SecureString -String "****" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
Get-AzSqlServer | Add-AzSqlServerTransparentDataEncryptionCertificate -ResourceGroupName "YourResourceGroupName" -PrivateBlob $securePrivateBlob -Password $securePassword
將 TDE 憑證新增至資源群組中的所有 SQL Server
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-PassThru
在 [成功執行] 上,傳回已新增的憑證物件。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Password
透明數據加密憑證的密碼
類型: | SecureString |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PrivateBlob
透明數據加密憑證的私人 Blob
類型: | SecureString |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源組名
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServerName
伺服器名稱
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SqlServer
sql server 輸入物件
類型: | AzureSqlServerModel |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-SqlServerResourceId
sql server 資源標識符
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |