< Back
Add-AzureRmSqlServerKeyVaultKey
Post
NAME Add-AzureRmSqlServerKeyVaultKey
SYNOPSIS
Adds a Key Vault key to a SQL server.
SYNTAX
Add-AzureRmSqlServerKeyVaultKey [-ResourceGroupName] <String> [-ServerName] <String> [-KeyId] <String> [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmSqlServerKeyVaultKey cmdlet adds a Key Vault key to the provided SQL server. The server must have 'get, wrapKey, unwrapKey'
permissions to the vault.
PARAMETERS
-AsJob [<SwitchParameter>]
Run cmdlet in the background
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-KeyId <String>
The Azure Key Vault KeyId.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
The name of the resource group
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
The Azure Sql Server name.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
Microsoft.Azure.Commands.Sql.ServerKeyVaultKey.Model.AzureSqlServerKeyVaultKeyModel
NOTES
Example 1: Add Key Vault key
PS C:\\> Add-AzureRmSqlServerKeyVaultKey -KeyId 'https://contoso.vault.azure.net/keys/co ... 2345678901' -ServerName
'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
This command adds the Key Vault key with Id 'https://contoso.vault.azure.net/keys/co ... 2345678901' to the SQL server
named 'ContosoServer' in the resource group 'ContosoResourceGroup'.
ResourceGroupName : ContosoResourceGroup ServerName : ContosoServer ServerKeyName : contoso_contosokey_01234567890123456789012345678901
Type : AzureKeyVault Uri : https://contoso.vault.azure.net/keys/co ... 2345678901 Thumbprint
: 1122334455667788990011223344556677889900 CreationDate : 1/1/2017 12:00:00 AM
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... eyvaultkey
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/
SYNOPSIS
Adds a Key Vault key to a SQL server.
SYNTAX
Add-AzureRmSqlServerKeyVaultKey [-ResourceGroupName] <String> [-ServerName] <String> [-KeyId] <String> [-AsJob] [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmSqlServerKeyVaultKey cmdlet adds a Key Vault key to the provided SQL server. The server must have 'get, wrapKey, unwrapKey'
permissions to the vault.
PARAMETERS
-AsJob [<SwitchParameter>]
Run cmdlet in the background
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-KeyId <String>
The Azure Key Vault KeyId.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
The name of the resource group
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
The Azure Sql Server name.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
Microsoft.Azure.Commands.Sql.ServerKeyVaultKey.Model.AzureSqlServerKeyVaultKeyModel
NOTES
Example 1: Add Key Vault key
PS C:\\> Add-AzureRmSqlServerKeyVaultKey -KeyId 'https://contoso.vault.azure.net/keys/co ... 2345678901' -ServerName
'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
This command adds the Key Vault key with Id 'https://contoso.vault.azure.net/keys/co ... 2345678901' to the SQL server
named 'ContosoServer' in the resource group 'ContosoResourceGroup'.
ResourceGroupName : ContosoResourceGroup ServerName : ContosoServer ServerKeyName : contoso_contosokey_01234567890123456789012345678901
Type : AzureKeyVault Uri : https://contoso.vault.azure.net/keys/co ... 2345678901 Thumbprint
: 1122334455667788990011223344556677889900 CreationDate : 1/1/2017 12:00:00 AM
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... eyvaultkey
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/