Edit

Share via


Add-AzSqlServerTransparentDataEncryptionCertificate

Adds a Transparent Data Encryption Certificate for the given SQL Server instance

Syntax

AddAzureRmSqlServerTransparentDataEncryptionCertificateDefaultParameterSet (Default)

Add-AzSqlServerTransparentDataEncryptionCertificate
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-PrivateBlob] <SecureString>
    [-Password] <SecureString>
    [-PassThru]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AddAzureRmSqlServerTransparentDataEncryptionCertificateInputObjectParameterSet

Add-AzSqlServerTransparentDataEncryptionCertificate
    [-SqlServer] <AzureSqlServerModel>
    [-PrivateBlob] <SecureString>
    [-Password] <SecureString>
    [-PassThru]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AddAzureRmSqlServerTransparentDataEncryptionCertificateResourceIdParameterSet

Add-AzSqlServerTransparentDataEncryptionCertificate
    [-SqlServerResourceId] <String>
    [-PrivateBlob] <SecureString>
    [-Password] <SecureString>
    [-PassThru]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Add-AzSqlManagedInstanceTransparentDataEncryptionCertificate adds a Transparent Data Encryption Certificate for the given SQL Server instance

Examples

Example 1

$securePrivateBlob = ConvertTo-SecureString -String "****" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
Add-AzSqlServerTransparentDataEncryptionCertificate -ResourceGroupName "YourResourceGroupName" -ServerName "YourServerName" -PrivateBlob $securePrivateBlob -Password $securePassword

Add TDE certificate to a sql server using resource group name and SQL Server name

Example 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

Add TDE certificate to the servers using server resourceId

Example 3

$securePrivateBlob = ConvertTo-SecureString -String "****" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
Get-AzSqlServer | Add-AzSqlServerTransparentDataEncryptionCertificate -ResourceGroupName "YourResourceGroupName" -PrivateBlob $securePrivateBlob -Password $securePassword

Add TDE certificate to all sql servers in a resource group

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

On Successful execution, returns certificate object that was added.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Password

The Password for Transparent Data Encryption Certificate

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateBlob

The Private blob for Transparent Data Encryption Certificate

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The Resource Group Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddAzureRmSqlServerTransparentDataEncryptionCertificateDefaultParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerName

The Server Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddAzureRmSqlServerTransparentDataEncryptionCertificateDefaultParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlServer

The sql server input object

Parameter properties

Type:AzureSqlServerModel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddAzureRmSqlServerTransparentDataEncryptionCertificateInputObjectParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlServerResourceId

The sql server resource id

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddAzureRmSqlServerTransparentDataEncryptionCertificateResourceIdParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

AzureSqlServerModel

String

Outputs

Boolean